I get nice ajax validations on fields when using the @Validate-annotation
This isn't ajax validation, it's javascript validation which means there is
no trip to the server. Look at the source for your page you'll see the
validation registered in a script block at the end.
If you want javascript validation of your form you can add javascript to
your component/page to observe the Tapestry.FORM_VALIDATE_EVENT. See
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?view=markup
Josh
On Mon, Jul 7, 2008 at 3:59 PM, Britske [EMAIL PROTECTED] wrote:
I get nice ajax validations on fields when using the @Validate-annotation
etc.
I want that as well for cross-field validation, but instead I get the
'general' validation box in red above my form.
I used the following validation-code to check if the two passwords supplied
are the same, and if not record an error to the password field:
Object onValidateForm(){
if(!user.getPassword().equals(user.getPasswordAgain())){
beanEditForm.recordError(password, the two
passwords supplied were not
the same));
}
Does this have to do with the 'ajax-validations' being bounded to a
particular field and the 'general validation' being bound to the form in
general (this is how it seems to me).
Does anyone know how to get the nice ajax-validations on the above
validation as well?
Thanks.
--
View this message in context:
http://www.nabble.com/how-to-get-the-nice-ajax-form-validations-when-using-beaneditform.recordError%28%29-tp18328440p18328440.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.