On Fri, 02 Dec 2011 11:11:21 -0200, Steve Eynon
wrote:
Correct.
And it still is best practice!
Yep. Or use @OnEvent(value = EventConstants.VALIDATE, component = "form").
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instruct
Correct.
And it still is best practice!
On 2 December 2011 18:38, angelochen wrote:
> I see, so the best practice should have been:
>
> onValidateFromID
>
> avoid using onValidate
>
> right?
>
>
> Steve Eynon wrote
>>
>>> So actually onValidate behave differently in 5.2.6 and 5.3?
>>
>> No, onVa
I see, so the best practice should have been:
onValidateFromID
avoid using onValidate
right?
Steve Eynon wrote
>
>> So actually onValidate behave differently in 5.2.6 and 5.3?
>
> No, onValidate() behaves the same in both T5.2.6 and T5.3, but T5.2.6
> *also* fired an onValidateForm() event.
> So actually onValidate behave differently in 5.2.6 and 5.3?
No, onValidate() behaves the same in both T5.2.6 and T5.3, but T5.2.6
*also* fired an onValidateForm() event.
Steve.
On 2 December 2011 13:40, angelochen wrote:
> Hi,
>
> So actually onValidate behave differently in 5.2.6 and 5.3?
>
Hi,
So actually onValidate behave differently in 5.2.6 and 5.3?
Steve Eynon wrote
>
> That would have worked in T5.2.6 (but no longer in T5.3)
>
> In T5.2.6 onValidateForm() was called once per form, so if your page
> had one form it was called once. But if your page had many forms then
> it w
That would have worked in T5.2.6 (but no longer in T5.3)
In T5.2.6 onValidateForm() was called once per form, so if your page
had one form it was called once. But if your page had many forms then
it was called many times (once per form) which meant you had to be
more specific and append the form I
I have a lot of onValidateForm, and also onValidateFormFromID, can not
remember why, seems to me I applied this rule:
1) if only one form in a page, I use onValidateForm
2) if more than a form in a page, I use onValidateFormFromID
is this right approach? thanks,
Angelo
Steve Eynon wrote
>
> M
Make sure you include the form name in the event handler. e.g.
your new method would be:
void onValidateFromAngryCows() {
...
}
because a barebones
void onValidate() {
...
}
gets called for the form *and* for every component in the form - which
you probably don't want!
Steve.
--
Steve Eyno
Yes, they work the same. The new "validate" event is fired just before the deprecated
"validateForm" and is meant to replace the old event.
Having both events in 5.2 is simply a way to rename the event while retaining
backwards compatibility.
On Fri, 02 Dec 2011 01:17:13 +0100, angelochen
wro
Thanks, does it work the same? what my approach will be, replace all
'onValidateForm' with 'onValidate' first in 5.2.6, and later upgrade to 5.3.
Martin Strand-4 wrote
>
> On Fri, 02 Dec 2011 00:21:09 +0100, angelochen
> wrote:
>
>> hi,
>>
>> to uprade to 5.3, we need to re
I wonder if we could write a code analysis tool that would check for these
sorts of things. We have @deprecated for methods and variables, so that works,
but when the "adaptive API" changes, it's considerably harder to catch/see.
Maybe a find-bugs extension for tapestry upgrades or something?
R
On Fri, 02 Dec 2011 00:21:09 +0100, angelochen
wrote:
hi,
to uprade to 5.3, we need to replace all onValidateForm to onValidate, but
does onValidate works in 5.2.6?
Yes, the "validate" event works in Tapestry 5.2.6:
http://tapestry.apache.org/5.2/apidocs/org/apache/tapestry5/EventConstants.
hi,
to uprade to 5.3, we need to replace all onValidateForm to onValidate, but
does onValidate works in 5.2.6?
Thanks,
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/onValidate-in-T5-2-6-tp5040192p5040192.html
Sent from the Tapestry - User mailing list archive at Nabble.c
13 matches
Mail list logo