http://tapestry.apache.org/tapestry4.1/components/form/form.html
Notice the difference between the success and the listener parameter.
When using listener, you have to manually check for validation errors...
... by getting the form's delegate and checking it for errors
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/valid/ValidationDelegate.html
Andy wrote:
I am trying to use Input Validation with tapestry-4.1.2-SNAPSHOT. I
don't know what I am doing wrong. Validation has simply no effect, in
the TextField for the email address I can enter anything or nothing...
The Form component, defined in the page class. As you can see I don't
have client side validation enabled at all. We are talking about
server side validation only.
@Component(
type = "Form",
id = "reservationStartForm",
bindings = {
"listener=ognl:listeners.submitForm",
"delegate=ognl:beans.delegate",
"clientValidationEnabled=ognl:false" })
public abstract IForm getReservationStartForm();
And the form field, defined in the template:
<tr>
<td class="formFieldLabel">
<label jwcid="@FieldLabel"
field="component:inputEmail">Label</label>
</td>
<td class="formField">
<input type="text" size="25" class="txt"
displayName="ognl:'Email'"
jwcid="[EMAIL PROTECTED]"
value="ognl:customer.address.email"
validators="validators:required,email[please check
the email format],minLength=8"/>
</td>
</tr>
Thanks,
Andy
---------------------------------------------------------------------
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]