On Jun 25, 2011, at 7:12 PM, Taha Tapestry wrote: > Hi Tony > > If your form's name is myForm then You should call onValidateFromMyForm(). If > you do not append "FromMyForm" then the method " onValidate" will be called > for each form field as well as for the form itself. > > Other alternative is to name the method anything else and annotate with > @OnEvent annotation and specify the event source >
Thank you very much. I'm just getting back into Tapestry (I have used 3 & 4) and I'm having a little trouble with the event model. So in 5.3.0 if I have a text field called userName, I could provide and onValidateFromUserName to provide validation for that field and onValidateFromMyForm to do multi field and other business rule (ie, unique column) rules I'm sure there is a value to calling onValidate() for each field, but I'm certainly struggling to imagine a use case. Thanks again. Tony > Regards > Taha > > On Jun 26, 2011, at 2:59 AM, Tony Nelson <tnel...@starpoint.com> wrote: > >> I saw in the release notes that onValidateForm has been replaced by >> onValidate. Should it be called 2x on form post? >> >> [1106760625@qtp-1806030550-8] DEBUG >> com.starpoint.helpdesk.pages.group.EditGroup - [ENTER] onPrepare() >> [1106760625@qtp-1806030550-8] DEBUG >> com.starpoint.helpdesk.pages.group.EditGroup - [ EXIT] onPrepare >> [1106760625@qtp-1806030550-8] DEBUG >> com.starpoint.helpdesk.pages.group.EditGroup - [ENTER] onValidate() >> [1106760625@qtp-1806030550-8] DEBUG >> com.starpoint.helpdesk.pages.group.EditGroup - [ EXIT] onValidate >> [1106760625@qtp-1806030550-8] DEBUG >> com.starpoint.helpdesk.pages.group.EditGroup - [ENTER] onValidate() >> [1106760625@qtp-1806030550-8] DEBUG >> com.starpoint.helpdesk.pages.group.EditGroup - [ EXIT] onValidate >> [1106760625@qtp-1806030550-8] DEBUG >> com.starpoint.helpdesk.pages.group.EditGroup - [ENTER] onSuccess() >> >> Previously I used the onValidateForm method to save my business objects and >> onSuccess() to redirect to the next page. >> >> What strategy should be used to convert from onValidateForm() to >> onValidate() ? >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org