Re: cross field validation with empty fields

2009-11-28 Thread Andreas Andreou
See http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/validator/Validator.html Probably just override getAcceptsNull() On Fri, Mar 6, 2009 at 7:21 PM, Ivano Luberti wrote: > Hello, we are using T4.1 > We have to validate a form and we don't want to do it client side. > Let

Re: cross field validation with empty fields

2009-03-11 Thread Ivano Luberti
Ok, thanks to all of you: it seems that my first email got unnoticed but now I have plenty to read :-D The renderError in the form componet would seem exaclty what we would need but unfortunately we are using T4.1 So I will have a look at the Va.lidationDelegate usage suggested by Jonathan. Thanks

Re: cross field validation with empty fields

2009-03-09 Thread Luther Baker
Thanks Elmer. And ugh ... sorry for the previous typo "@Elmo", (Cool Beans was @Jonathan for his Bean example - but got out of order in this thread). -Luther On Mon, Mar 9, 2009 at 1:02 PM, Luther Baker wrote: > Cool beans. Literally :) > > > > On Mon, Mar 9, 2009 at 12:49 PM, Jonathan Barke

Re: cross field validation with empty fields

2009-03-09 Thread Luther Baker
Cool beans. Literally :) On Mon, Mar 9, 2009 at 12:49 PM, Jonathan Barker < jonathan.theit...@gmail.com> wrote: > My experience was with 4.0. > > You want to look at the ValidationDelegate. > > @Bean > public abstract ValidationDelegate getDelegate(); > > // set up as listener for form > public

RE: cross field validation with empty fields

2009-03-09 Thread Elmer Smith
ycle to forward to other pages // or throw a RedirectException } } I just thought the poster might still be pondering what to do in T4. Cheers, Elmer -Original Message- From: Luther Baker [mailto:lutherba...@gmail.com] Sent: Monday, March 09, 2009 1:49 PM To: Tapestry user

Re: cross field validation with empty fields

2009-03-09 Thread Luther Baker
Oops sorry @Elmer, I mistyped your name in the previous post and meant @Ivano. Also, @Elmo, I think you're suggestion was perfect! but it looked like T5 code. Shows how little I know about T4 though. Sorry - I think your post was right on if all those annotations and events were in T4. -Luther

Re: cross field validation with empty fields

2009-03-09 Thread Jonathan Barker
My experience was with 4.0. You want to look at the ValidationDelegate. @Bean public abstract ValidationDelegate getDelegate(); // set up as listener for form public void onSubmit(IRequestCycle cycle){ ValidationDelegate = getDelegate(); (if (delegate.getHasErrors()) return; if (

Re: cross field validation with empty fields

2009-03-09 Thread Luther Baker
That's a fine point to clarify. My underlying suggestion wasn't meant to imply which was the correct, well-defined event to handle. This is the second post ... no luck/help so far? ... So my suggestion is that, if all else fails, you can do MANUAL validation in, if nothing else, the MAIN event han

RE: cross field validation with empty fields

2009-03-09 Thread Elmer Smith
field validation with empty fields Em Mon, 09 Mar 2009 14:08:43 -0300, Luther Baker escreveu: > Oddly enough, it is NOT the validation handler I want to bring to your > attention to (here on this validation.html page :) and again, obviously, > this is Tapestry 5 - but notice how authenticat

Re: cross field validation with empty fields

2009-03-09 Thread Thiago H. de Paula Figueiredo
Em Mon, 09 Mar 2009 14:08:43 -0300, Luther Baker escreveu: Oddly enough, it is NOT the validation handler I want to bring to your attention to (here on this validation.html page :) and again, obviously, this is Tapestry 5 - but notice how authentication is done in the SUCCESS handler. Authe

Re: cross field validation with empty fields

2009-03-09 Thread Luther Baker
I'm not familiar worth T4.1 but it seems to me that you could put something in the submit or success handler that validates. Take a look here - http://tapestry.apache.org/tapestry5/guide/validation.html and find the following snippet: public class Login { *String onSuccess() {

RE: cross field validation with empty fields

2009-03-09 Thread Elmer Smith
Ivano, I'm pretty sure what you want to do is provide an onValidate method in your page class. That method gets called expressly for doing more complicated validation. If you have more than one form, you'll have to further specify it e.g. onValidateFromMyFormName (or use @OnEvent annotation). H