Validate events are indeed called for each component, and then a validate
event is called for the entire form.

If your fields are "usernameField" and "passwordField" in a "loginForm", you
would expect:

onValidateFromUsernameField()
onValidateFromPasswordField()
onValidateFormFromLoginForm();

With a single form, you may just want to use onValidateForm().


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2008 08:46
> To: users@tapestry.apache.org
> Subject: Form validation question
> 
>  From reading the documentation I am under the impression that during
> form submission a VALIDATE_FORM event is emitted once. However, I
> observe onValidate() being called for every component in the form, the
> value from the component not being set until *after* onValidate has
> apparently been called on that component. For instance, I have
> username and password fields (with values typed in of "admin,
> "admin"), and I get during onValidate():
> 
> on validate: null / null
> on validate: admin / null
> 
> I would have thought it was called just once and would have all values
> set. What is going on and what am I not understanding here?
> 
> thanks,
> p
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to