I have a lot of onValidateForm, and also onValidateFormFromID, can not remember why, seems to me I applied this rule:
1) if only one form in a page, I use onValidateForm 2) if more than a form in a page, I use onValidateFormFromID is this right approach? thanks, Angelo Steve Eynon wrote > > Make sure you include the form name in the event handler. e.g. > > <t:form t:id="angryCows" > > > your new method would be: > > void onValidateFromAngryCows() { > ... > } > > because a barebones > > void onValidate() { > ... > } > > gets called for the form *and* for every component in the form - which > you probably don't want! > > Steve. > > -- > Steve Eynon > ------------------------------- > "If at first you don't succeed, > so much for skydiving!" > > > > > On 2 December 2011 08:41, Martin Strand > <do.not.eat.yellow.snow@> wrote: >> Yes, they work the same. The new "validate" event is fired just before >> the >> deprecated "validateForm" and is meant to replace the old event. >> Having both events in 5.2 is simply a way to rename the event while >> retaining backwards compatibility. >> >> >> On Fri, 02 Dec 2011 01:17:13 +0100, angelochen <angelochen960@.com> >> wrote: >> >>> Thanks, does it work the same? what my approach will be, replace all >>> 'onValidateForm' with 'onValidate' first in 5.2.6, and later upgrade to >>> 5.3. >>> >>> >>> Martin Strand-4 wrote >>>> >>>> >>>> On Fri, 02 Dec 2011 00:21:09 +0100, angelochen >>>> <angelochen960@.com> >>>> >>>> wrote: >>>> >>>>> hi, >>>>> >>>>> to uprade to 5.3, we need to replace all onValidateForm to onValidate, >>>>> but >>>>> does onValidate works in 5.2.6? >>>> >>>> >>>> Yes, the "validate" event works in Tapestry 5.2.6: >>>> >>>> http://tapestry.apache.org/5.2/apidocs/org/apache/tapestry5/EventConstants.html#VALIDATE >>>> >>>> "validateForm" was deprecated in 5.2: >>>> >>>> http://tapestry.apache.org/5.2/apidocs/org/apache/tapestry5/EventConstants.html#VALIDATE_FORM >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/onValidate-in-T5-2-6-tp5040192p5040685.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