Thanks Thiago. Norman's solution is working fine for me, so I will leave it like that. (I like keeping my JavaScript to the .tml file as much as possible to maintain a cleaner separation between the page template and the page class.) But thanks again for your suggestion. Your approach may come in handy for another problem.
I am still wondering why Tapestry strips away all <script> unless it's in a block. Can anyone shed any light on this? Regards, Benny On Thu, Feb 4, 2010 at 6:08 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Thu, 04 Feb 2010 21:01:39 -0200, Benny Law <benny.mk....@gmail.com> > wrote: > > Thiago, I don't see your comments (except your friendly "Hi"). Could you >> respond again please? Thanks. >> > > Hi! :D > > I tripped over my keyboard and accidentally sent the message before > finishing it. :P > > > from the zone when it renders. I also tried to use >>> >>>> RenderSupport.addScript() >>>> in the action link event handler that updates the zone, but got the >>>> error "No object of type org.apache.tapestry5.RenderSupport is available >>>> from >>>> the Environment". >>>> >>> > RenderSupport is only available while rendering. > > My questions are: > > (2) What is the proper way to include dynamic JavaScript in zones? >>>> >>> > One way of doing it is creating a component containing what you want be in > inside the zone. Then, in its @SetupRender method, user > RenderSupport.addScript() to generate JavaScript lines. > > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, software architect and developer, Ars Machina Tecnologia da > Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >