Re: Tapesty5.4.0 'submit' button throws page validation error

2016-06-13 Thread JumpStart
These working examples might help too. http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/programmaticvalidation http://jumpstart.doublenegative.com.au/jumpstart7/examples/in

Re: Tapesty5.4.0 'submit' button throws page validation error

2016-06-13 Thread sheikh hossain
That's awesome ! Once again Cezary you have been quick and precise. Thank you so much for the solution and the detail explanation with code example. It really helped. It worked after I renamed onValidate method. Thank you for attention to details and other suggestion. Much much appreciated. O

Re: Tapesty5.4.0 'submit' button throws page validation error

2016-06-13 Thread Cezary Biernacki
Even simpler solution is to remove your "onValidate" method and just use Tapestry's "required" validator: " You can customise the error message by putting an appropriate entry in your message catalog (see http://tapestry.apache.org/forms-and-validation.html#FormsandValidation-CustomizingValidatio

Re: Tapesty5.4.0 'submit' button throws page validation error

2016-06-13 Thread Cezary Biernacki
A correction, this part: void onValidateFromName(TaxZone z) { if (z.getName() == null || z.getName().trim().length() == 0) { form.recordError(nameField, "You must enter a name."); } } should be actually: void onValidateFromName(String name) {

Re: Tapesty5.4.0 'submit' button throws page validation error

2016-06-13 Thread Cezary Biernacki
Hi, your "onValidate" method does not specify for which component it should be invoked, so it is invoked for all components that trigger "validate" event. Tapestry invokes validate for each input form control (providing an input value as the context argument) plus one for the whole form itself with

Tapesty5.4.0 'submit' button throws page validation error

2016-06-13 Thread sheikh hossain
Hi, Our application has a page which submits a form through a submit button and it goes through the page 'onValidate' and fails the validation. the .tml file has - - - - - - - - - - - ${message:button.cancel} - - - - - -