the @Validate is only interpreted if used in a bean 
that is displayed by a BeanEditor(Form).

in your case you'd have to apply directly to your
checkbox....

...<t:checkbox  t:validate="required".... 

g,
kris




Ciaran Wood <[EMAIL PROTECTED]> 
11.06.2008 16:38
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
Tapestry users <users@tapestry.apache.org>
Kopie

Thema
T5 checkbox component and validation






Does the checkbox component provided with tapestry support validation? 
(via
the @Validate annotation?) I¹m trying it and it doesn¹t seem to validate 
on
either the client side or the server side....

My example code:

<ValidateCheckbox.tml>
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> 
<body>
<t:form>        <t:label for="tickMe">            Tick Me </t:label>
<t:checkbox t:id="tickMe" t:value="tickMe"></t:checkbox>        <t:submit 
/>
</t:form> </body> </html>

<ValidateCheckbox.java>
public class ValidateCheckbox {        @Property    @Validate("required")
private Boolean tickMe;    }

Thanks in advance for any help/tips!

Ciaran Wood

Reply via email to