Re: T5: New Validators and server side validation

2008-04-30 Thread lebenski
>> field will show the errors. Makes the code very clean and the front-end >>> experience is slick (e.g. registration page has the same validator to >>> check >>> if username is taken and this is fired from the client and from the >>> server!). I'd

Re: T5: New Validators and server side validation

2008-03-04 Thread LakshithaS
d this is fired from the client and from the >> server!). I'd suggest T5 move to such a design. >> >> - Original Message - >> From: "Bill Holloway" <[EMAIL PROTECTED]> >> To: "Tapestry users" >> Sent: Wednesday, May 16, 2007

Re: T5: New Validators and server side validation

2007-05-23 Thread Nick Westgate
+1 for this. I thought you'd missed it, and was going to bring it up on the dev list. But a week later ... GMail "star" to the rescue? ;-) Any thoughts from others on this? Cheers, Nick. Howard Lewis Ship wrote: I agree: - onblur vs. onform submit - option to validate via server-round trip (

Re: T5: New Validators and server side validation

2007-05-23 Thread Howard Lewis Ship
Original Message - From: "Bill Holloway" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, May 16, 2007 2:27 PM Subject: Re: T5: New Validators and server side validation > That's got it, Ben. Thanks. Wish I knew more about javascript > prototy

Re: T5: New Validators and server side validation

2007-05-17 Thread kranga
lidator to check if username is taken and this is fired from the client and from the server!). I'd suggest T5 move to such a design. - Original Message - From: "Bill Holloway" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, May 16, 2007 2:

Re: T5: New Validators and server side validation

2007-05-16 Thread Bill Holloway
Add a script include to your border/page (to load your validation function) and change the render method to use MyProject.Field.email and you are good to go cheers. -- Ben Sommerville > -Original Message- > From: Bill Holloway [mailto:[EMAIL PROTECTED] > Sent: Wed

Re: T5: New Validators and server side validation

2007-05-16 Thread Juan Maya
This "weird" problem was being caused because my integration with ACEGI. On 5/15/07, Juan Maya <[EMAIL PROTECTED]> wrote: I think i am starting to be annoying but i found out that inside a component the first form will not execute server side validation. In the following code the the validators

RE: T5: New Validators and server side validation

2007-05-16 Thread Ben Sommerville
> -Original Message- > From: Bill Holloway [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 16 May 2007 4:33 PM > To: Tapestry users > Subject: Re: T5: New Validators and server side validation > > In implementing an e-mail validator myself, one thing I notice in all >

Re: T5: New Validators and server side validation

2007-05-15 Thread Bill Holloway
In implementing an e-mail validator myself, one thing I notice in all this is a Javascript error that reads Error: Tapestry.Field.email is not a function... I did some digging and found in org/apache/tapestry/tapestry.js the building up of the Tapestry object has in it a section involving "Colle

Re: T5: New Validators and server side validation

2007-05-15 Thread Juan Maya
Hi Marcus. Here are the classes: Email.java package com.dodo.community.web.validators; import static org.apache.tapestry.TapestryUtils.quote; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import org.apache.tapestry.Field; import org.apache.tapestry.MarkupWriter; i

Re: T5: New Validators and server side validation

2007-05-15 Thread Marcus
Juan, I'm trying, but having a lot of compilation errors. If you post all code added to AppModule.java and Email class, maybe i can help you. Marcus

Re: T5: New Validators and server side validation

2007-05-15 Thread Juan Maya
I think i am starting to be annoying but i found out that inside a component the first form will not execute server side validation. In the following code the the validators will be executed fine. However the validators will not be executed if i change the code t

Re: T5: New Validators and server side validation

2007-05-15 Thread Juan Maya
I found out my problem. For some reason i added an id parameter to the form component and this was causing the problem. Sorry :S On 5/15/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: Really? That's a surprise and a bug if true. On 5/15/07, Juan Maya <[EMAIL PROTECTED]> wrote: > > But none

Re: T5: New Validators and server side validation

2007-05-15 Thread Juan Maya
Hi Marcus. I am doing exactly the same but using a tapestry validator so it handles server and client validation. the code is something like: public class Email implements Validator { public void validate(Field field, Void constraintValue, MessageFormatter formatter, Object value) throws Validat

Re: T5: New Validators and server side validation

2007-05-15 Thread Marcus
Hi Juan, If u do it, may u share the code with us? On server side, we're using this regular expression. import java.util.regex.Pattern; public class EmailValid { public static boolean isValid(String email) { return Pattern.matches( "([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\\

Re: T5: New Validators and server side validation

2007-05-15 Thread Juan Maya
It doesn't work for me. I am using tapestry 5.0.4. On 5/15/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: Really? That's a surprise and a bug if true. On 5/15/07, Juan Maya <[EMAIL PROTECTED]> wrote: > > But none of the basic implementors are executing server side validation. > (i > tried re

Re: T5: New Validators and server side validation

2007-05-15 Thread Howard Lewis Ship
Really? That's a surprise and a bug if true. On 5/15/07, Juan Maya <[EMAIL PROTECTED]> wrote: But none of the basic implementors are executing server side validation. (i tried required and minLength) On 5/15/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > > Yes, but the magic is built into

Re: T5: New Validators and server side validation

2007-05-15 Thread Juan Maya
But none of the basic implementors are executing server side validation. (i tried required and minLength) On 5/15/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: Yes, but the magic is built into the validator implementation. On 5/15/07, Juan Maya <[EMAIL PROTECTED]> wrote: > > I Howard, > Tha

Re: T5: New Validators and server side validation

2007-05-15 Thread Howard Lewis Ship
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 th

Re: T5: New Validators and server side validation

2007-05-15 Thread Juan Maya
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

Re: T5: New Validators and server side validation

2007-05-15 Thread Howard Lewis Ship
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. Then i contributed the Validator in My AppModule: public static void contributeFiel