Re: [t5] Validator question

2008-03-25 Thread Julian Wood
Actually, I was able to get this done. I had to contributeValidationMessagesSource to get the messages. And to get to the current page component from within the Validator, I was able to do this: public static void contributeFieldValidatorSource (MappedConfiguration configuration,

Re: [t5] Validator question

2008-03-25 Thread Julian Wood
Ok no worries. On a related note, where do you put the messages file for a custom validator? In the example below, which looks for a key called 'confirm', I have tried Confirm.properties (in same package as validator called Confirm.java), Signup.properties (the page using the validator) a

Re: [t5] Validator question

2008-03-25 Thread Howard Lewis Ship
Sorry, those APIs are not in place yet. I have JIRA issue add optional validators, which is a loose, general term for what you are aiming for ("password is required if userName is given"). I think some relationships may not be expressable using the @Validate annotation, i.e., the string represent

Re: [t5] Validator question

2008-03-25 Thread Julian Wood
Not possible? Sometimes a validator needs to look at input from another field to see if it is valid (ie password/confirmPassword). I know it's easy to do in onValidateForm, but I'd like to see how to do it in a nice modular Validator. I'm looking for something like: public void valida

[t5] Validator question

2008-03-24 Thread Julian Wood
How can you get access to an arbitrary Field from inside a Validator, given its id? In t4 it was relatively easy to grab the form and from there grab a field. Thanks, J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: t5: validator questions...

2008-03-21 Thread Robert Zeigler
Don't declare the field as mandatory. Then add your custom validation to onValidateFromXXX where XXX is the id of your form. Validate the id there. Alternatively, you could contribute your own validator, which doesn't perform any client-side validation. Robert On Mar 21, 2008, at 3/219:50

Re: t5: validator questions...

2008-03-21 Thread Angelo Chen
Hi Robert, oh i see, so for every validation you have to code two, one in java and another one in js, this does bring up another question, can 'clientvalidation' be set in the field level? say, I have a form, all the fields can be validated client side except a customer id field, which requires u

Re: t5: validator questions...

2008-03-21 Thread Robert Zeigler
One is for client-side validation, and the other is for server-side validation? Client-side validation is a nicety that makes the validation process less painful for a client. But you can't rely on it for any sort of "security" since all it takes to bypass it is to turn of javascript. Hence,

t5: validator questions...

2008-03-21 Thread Angelo Chen
Hi, Looking at Tapestry.js' addValidator for 'Required': required : function(field, message) { Tapestry.addValidator(field, true, function(value, event) { if (value == '') event.recordError(message); }); }, and also the Required.java, it has a validation t

Re: T5 validator question

2008-03-12 Thread Riccardo Ruffilli
ause I need to obtain > myown FieldValidatorImpl > instance. > > Any ideas about that ? > > Many thanks in advance. > > -Rick > > > > -- View this message in context: http://www.nabble.com/T5-validator-question-tp16001442p16001764.html Sent from the Tapestry - User

T5 validator question

2008-03-12 Thread Riccardo Ruffilli
View this message in context: http://www.nabble.com/T5-validator-question-tp16001442p16001442.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[T5] Validator JavaScript problem with clientValidation=false

2007-09-07 Thread Christian Koeberl
Hello! Has anybody ever tried to set "clientValidation=false" in a form with validators? The T5 validators still generate the validation JavaScript but the form does not inlude the required JS-libs. This leads to an JS error on the client side. This script is generated with clientValidation=fa

Re: T5 Validator

2007-08-20 Thread Nick Westgate
uting new validation messages and the actual validators) Jon -Original Message- From: Jonathan Glanz [mailto:[EMAIL PROTECTED] Sent: Monday, August 20, 2007 8:19 AM To: 'Tapestry users' Subject: RE: T5 Validator All, I've got a couple of completely functional valdators now and

RE: T5 Validator

2007-08-20 Thread Jonathan Glanz
module code for contributing new validation messages and the actual validators) Jon -Original Message- From: Jonathan Glanz [mailto:[EMAIL PROTECTED] Sent: Monday, August 20, 2007 8:19 AM To: 'Tapestry users' Subject: RE: T5 Validator All, I've got a couple of completely

RE: T5 Validator

2007-08-20 Thread Jonathan Glanz
. -Cheers, Jon -Original Message- From: Chris Lewis [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 11:04 AM To: Tapestry users Subject: Re: T5 Validator Another option is to provide and explicit banner parameter to the error component. You may not like having to set it ex

Re: T5 Validator

2007-08-17 Thread Chris Lewis
Another option is to provide and explicit banner parameter to the error component. You may not like having to set it explicitly, but I personally prefer doing that to overriding the prop file found on the class path (fyi, adding a 'default-banner' message to the application catalog doesn't work

Re: T5 Validator

2007-08-16 Thread Nick Westgate
See: http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner Also, when you get your validator working, please consider adding it to the wiki: http://wiki.apache.org/tapestry/Tapestry5HowTos Cheers, Nick. DougS wrote: Also, is it possible to override the default er

Re: T5 Validator

2007-08-16 Thread DougS
reat. > > many thx, Jon > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message

T5 Validator

2007-08-16 Thread jglanz
Hey guys, I've been using T5 for a while and haven't needed to create my own validator until now and I am absolutely dumb founded for how to do itany insight would be great. many thx, Jon - To unsubscribe, e-mail: [EMAIL PRO