Thiago & Josh - thank you so much for your valuable responses! In the meantime, I was able to find out that the client-id is modified with a random suffix. Since my page is very simple and the zone will only have a single form, the solution posted by Josh works nicely:
$('testzone').select('form')[0] Now - I have one more problem. For the form, I need something like "interactive validation". Basically, rather than using a "required" validator, I just need to display the javacript confirm dialog to the user if the field is empty, to ensure that they really want to save an empty value. In traditional JavaScript, I would just do this: return confirm('Are you sure to save a blank value?') in the onSubmit handler of the form. But this won't work here. So I was thinking that perhaps I should just use the "required" validator, but handle the Tapestry.FORM_VALIDATE_EVENT and display the prompt here - and in case the user confirms, just set form's validation error to false (to allow it to be submitted even if the required validator failed). But this doesn't seem to do the trick. Is this a completely wrong way? Thanks again, Rado Thiago H. de Paula Figueiredo wrote: > > On Fri, 28 May 2010 12:22:10 -0300, Josh Canfield <joshcanfi...@gmail.com> > wrote: > >> When elements are loaded into a zone their id's get modified to ensure >> they are still unique in the page. >> >> You can try using a different method for finding the form. If you know >> it's the only form in the zone you can use > > Or give the zone a fixed client id (id parameter) instead of letting > Tapestry do that. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, 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 > > > -- View this message in context: http://old.nabble.com/T5%3A-Using-Event.observer-with-a-form-within-a-t%3Ablock-tp28697334p28731907.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org