RE: Form validation question

2008-08-06 Thread Jonathan Barker
() onValidateFormFromLoginForm(); With a single form, you may just want to use onValidateForm(). > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 06, 2008 08:46 > To: users@tapestry.apache.org > Subject: Form validation quest

Form validation question

2008-08-06 Thread photos
From reading the documentation I am under the impression that during form submission a VALIDATE_FORM event is emitted once. However, I observe onValidate() being called for every component in the form, the value from the component not being set until *after* onValidate has apparently been c

Re: form validation question

2006-07-03 Thread Paul Cantrell
I'll throw in my endorsement for (1). Often, we programmers get too wrapped up in try to use some clever framework feature for every minute detail ... when sometimes, it's simpler just to write a few lines of code. A listener which first performs validation before processing is easy to wr

Re: Re: form validation question

2006-07-03 Thread Jesse Kuhnert
AhhI really need to finish up the 4.1 release. We'll be able to support arbitrary requirements logic like this now as well. (on the client side && server.. Ie if this field gets filled out/selected then these other two fields are required. Stuff like that) On 7/3/06, Richard Clark <[EMAIL PRO

Re: Re: form validation question

2006-07-03 Thread Richard Clark
You can either: 1) Do all the validation in your listener (on the Java side), or 2) Write your own client-side valdation code in JavaScript. The server-side validation would look like this: ValidationDelegate delegate = (ValidationDelegate)getComponent("delegate"); if (!getCheckbox()) { String

Re: form validation question

2006-07-03 Thread Valdemaras Repšys
Labas Aleksej, Hi Shing, thanks for the answers. I think Aleksej's solution is simpler and it fits. But the bad thing is i'll have to say a good bye to client side validation.. Valdemaras Repšys On 7/3/06, Aleksej <[EMAIL PROTECTED]> wrote: bėgantis debesis wrote: > Hi, > > to simplify a prob

Re: form validation question

2006-07-03 Thread Aleksej
bėgantis debesis wrote: Hi, to simplify a problem, let's say i have a @Checkbox and many @Text components in a form. I want no validation when the checkbox is checked, and validation must be executed, when form is submitted with the checkbox not checked. @Text component contents must be validate

Re: form validation question

2006-07-03 Thread Shing Hing Man
I do not have an easy solution to your problem. The following is just an idea which I have not tested. Have you considered 'extending' the component TextField to hava an extra boolean parameter 'validation flag' ? The idea is that validation is skipped according to the 'validation flag'. In you

form validation question

2006-07-02 Thread bėgantis debesis
Hi, to simplify a problem, let's say i have a @Checkbox and many @Text components in a form. I want no validation when the checkbox is checked, and validation must be executed, when form is submitted with the checkbox not checked. @Text component contents must be validated. Do you know any ways o