You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by P....@albourne.com on 2011/10/27 12:49:10 UTC

Tapestry 5.3 Validation removal of validateForm

Hi All,

The 5.3 release notes provide the following info:
"validateForm" event triggered by Form component (replaced with "validate" event)

How validate replaces validateForm is not clear to me and I could not find any more info? 

These two methods are certainly not interchangeable, i.e.: validateForm was invoked just before OnSucess and once for a form, whereas onValidate may potentially be called several times with a different event life-cycle. Is there an example of how to re-factor code that was using 'validateForm' to use 'Validate', and in such a way as to reproduce the behaviour of validateForm? The only other alternative is to have one method per data point, which is really not practical for anything scalable.

Kind regards,
Peter






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.3 Validation removal of validateForm

Posted by Peter Stavrinides <P....@albourne.com>.
> "onValidateFrom<Form-component-id>"
Yes of course, why didn't I think of that (too much coffee today perhaps!)... Thanks!

> Simply using onValidate is probably not specific enough as it may get
> triggered by bubbling events.
Exactly, OnValidate is a catch all so does get invoked for each bubbling validation event. Guess the release notes also threw me a little.

Cheers,
Peter




----- Original Message -----
From: "Chris Poulsen" <ma...@nesluop.dk>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Thursday, 27 October, 2011 14:51:25 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Tapestry 5.3 Validation removal of validateForm

My guess would be "onValidateFrom<Form-component-id>" replaces
"validateForm" ?

Simply using onValidate is probably not specific enough as it may get
triggered by bubbling events.

-- 
Chris

On Thu, Oct 27, 2011 at 12:49 PM, <P....@albourne.com> wrote:

> Hi All,
>
> The 5.3 release notes provide the following info:
> "validateForm" event triggered by Form component (replaced with "validate"
> event)
>
> How validate replaces validateForm is not clear to me and I could not find
> any more info?
>
> These two methods are certainly not interchangeable, i.e.: validateForm was
> invoked just before OnSucess and once for a form, whereas onValidate may
> potentially be called several times with a different event life-cycle. Is
> there an example of how to re-factor code that was using 'validateForm' to
> use 'Validate', and in such a way as to reproduce the behaviour of
> validateForm? The only other alternative is to have one method per data
> point, which is really not practical for anything scalable.
>
> Kind regards,
> Peter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.3 Validation removal of validateForm

Posted by Steve Eynon <st...@alienfactory.co.uk>.
Lets say your form is called IceCreamSelection, then you would handle it with:

onValidateFromIceCreamSelection()

by using onEVENTfromCOMPONENTID you get your specificity back.

Steve.


On 27 October 2011 19:51, Chris Poulsen <ma...@nesluop.dk> wrote:
> My guess would be "onValidateFrom<Form-component-id>" replaces
> "validateForm" ?
>
> Simply using onValidate is probably not specific enough as it may get
> triggered by bubbling events.
>
> --
> Chris
>
> On Thu, Oct 27, 2011 at 12:49 PM, <P....@albourne.com> wrote:
>
>> Hi All,
>>
>> The 5.3 release notes provide the following info:
>> "validateForm" event triggered by Form component (replaced with "validate"
>> event)
>>
>> How validate replaces validateForm is not clear to me and I could not find
>> any more info?
>>
>> These two methods are certainly not interchangeable, i.e.: validateForm was
>> invoked just before OnSucess and once for a form, whereas onValidate may
>> potentially be called several times with a different event life-cycle. Is
>> there an example of how to re-factor code that was using 'validateForm' to
>> use 'Validate', and in such a way as to reproduce the behaviour of
>> validateForm? The only other alternative is to have one method per data
>> point, which is really not practical for anything scalable.
>>
>> Kind regards,
>> Peter
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.3 Validation removal of validateForm

Posted by Chris Poulsen <ma...@nesluop.dk>.
My guess would be "onValidateFrom<Form-component-id>" replaces
"validateForm" ?

Simply using onValidate is probably not specific enough as it may get
triggered by bubbling events.

-- 
Chris

On Thu, Oct 27, 2011 at 12:49 PM, <P....@albourne.com> wrote:

> Hi All,
>
> The 5.3 release notes provide the following info:
> "validateForm" event triggered by Form component (replaced with "validate"
> event)
>
> How validate replaces validateForm is not clear to me and I could not find
> any more info?
>
> These two methods are certainly not interchangeable, i.e.: validateForm was
> invoked just before OnSucess and once for a form, whereas onValidate may
> potentially be called several times with a different event life-cycle. Is
> there an example of how to re-factor code that was using 'validateForm' to
> use 'Validate', and in such a way as to reproduce the behaviour of
> validateForm? The only other alternative is to have one method per data
> point, which is really not practical for anything scalable.
>
> Kind regards,
> Peter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>