Hi Guys,

"validate=required" on a checkbox does not make sense to me. A chekbox can 
either be unchecked (resulting in false) or checked (resulting in true). I.e. 
the validation "required" can never fail. Could it be you are talking about 
t:radio and t:radiogroup ?

Regards nillehammer

----- original Nachricht --------

Betreff: Antwort: Re: T5 checkbox component and validation
Gesendet: Mi, 11. Jun 2008
Von: Kristian Marinkovic<[EMAIL PROTECTED]>

> oops... you're right there is no validate parameter defined 
> for a checkbox. :)
> 
> you could  use the onValidateFormFrom<FormComponentId>
> event instead
> 
> 
> g,
> kris
> 
> 
> 
> 
> 
> 
> 
> Ciaran Wood <[EMAIL PROTECTED]> 
> 11.06.2008 16:51
> Bitte antworten an
> "Tapestry users" <users@tapestry.apache.org>
> 
> 
> An
> Tapestry users <users@tapestry.apache.org>
> Kopie
> 
> Thema
> Re: T5 checkbox component and validation
> 
> 
> 
> 
> 
> 
> 
> I just tried that, no luck! It still doesn't do any validation. If it 
> helps
> I'm using the 5.0.13-SNAPSHOT release.
> 
> Ciaran Wood
> 
> 
> On 11/06/2008 3:46pm, "Kristian Marinkovic"
> <[EMAIL PROTECTED]> wrote:
> 
> > 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
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

--- original Nachricht Ende ----


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

Reply via email to