Yes, but the magic is built into the validator implementation.
On 5/15/07, Juan Maya <[EMAIL PROTECTED]> wrote:
I Howard, Thank u for the answer. That was what i did. I followed the pattern but i didn't see how to add easily new Javascript. I could modify tapestry.js but i think that's not the best way to do it. I thought the validators were able to execute server and client side validation. According to the documentation "Tapestry excels at creating forms and validating input. Input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (once implemented) on the client as well." Thanks On 5/15/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > > On 5/14/07, Juan Maya <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > I am trying to contribute a new Email Validator that would check if an > > email is valid or not. > > > > To do it i created a class Email that implements Validator<Void, > Object>. > > Then i contributed the Validator in My AppModule: > > public static void > > contributeFieldValidatorSource(MappedConfiguration<String, Validator> > > configuration){ > > configuration.add(Email.NAME, new Email()); > > } > > > > My question are: > > 1. How could i add a client side validation for my email validation? > > > > Follow the pattern present in the existing validators. > > > 2. I disabled js in my browser and none of the basic Validators > (required, > > minLegth, etc) worked . Am i a missing something obvious? > > > > If JavaScript is disabled, then you don't get client side validation, > since > it requires JavaScript. That's why you always re-check on the server. > > > Thanks > > > > > > -- > Howard M. Lewis Ship > TWD Consulting, Inc. > Independent J2EE / Open-Source Java Consultant > Creator and PMC Chair, Apache Tapestry > Creator, Apache HiveMind > > Professional Tapestry training, mentoring, support > and project work. http://howardlewisship.com >
-- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com