Correction:
<component id="editForm" type="Form">
<binding name="clientValidationEnabled" value="true"/>
</component>
<component id="orgName" type="TextField">
<binding name="value" value="ognl:organisation.name"/>
<binding name="validators" value="validators:string"/>
<binding name="displayName" value="ognl:'Name'"/>
</component>
The correct prefix is "validators:".
On 8/17/05, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> <component id="form" type="Form">
> <binding name="clientValidationEnabled" value="true"/>
> </component>
>
> <component id="increment" type="TextField">
> <binding name="validators" value="validators:required" />
> <binding name="displayName" value="message:increment" />
> <binding name="value" value="wrapper.increment" />
> </component>
>
> This is for beta-4. The validators: prefix is now necessary (if a bit
> repetative). clientValidationEnabled is a parameter of Form, not
> TextField.
>
> On 8/17/05, David Syer <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I must be missing something. I cannot see how to use the new validators=
> > framework to simply ensure that a TextField represents a number. There is
> > no validator in the forms/validate package that looks like to old "int"
> > validator in a ValidField.
> >
> > I have successfully made a "required" validator reject a page with an empty
> > text field:
> >
> > <component id="increment" type="TextField">
> > <binding name="validators" value="required" />
> > <binding name="clientValidationEnabled" value="true"/>
> > <binding name="displayName" value="message:increment" />
> > <binding name="value" value="wrapper.increment" />
> > </component>
> >
> > and I can extend the validators binding to "required,maxLength=2" to accept
> > only two digits. But I cannot see how to reject an invalid number.
> >
> > Also if the validators are "required,max=10" then the Max validator barfs
> > (ClassCastException). Is this a bug or am I dong something wrong?
> >
> > By the way, I have tried adding a translators binding to the field viz:
> >
> > <binding name="translators" value="translator:number" />
> >
> > And this has no discernable effect.
> >
> > Dave.
> >
> > This email and any files transmitted with it are confidential and
> > proprietary to Algorithmics Incorporated and its affiliates
> > ("Algorithmics"). If received in error, use is prohibited. Please destroy,
> > and notify sender. Sender does not waive confidentiality or privilege.
> > Internet communications cannot be guaranteed to be timely, secure, error or
> > virus-free. Algorithmics does not accept liability for any errors or
> > omissions. Any commitment intended to bind Algorithmics must be reduced to
> > writing and signed by an authorized signatory.
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work. http://howardlewisship.com
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]