Already pointed out that this is expected. But you can bypass this
behavior.
Make your two-parameter method return "true" on successful processing;
then your 1-parameter method won't be called.
Robert
On Mar 25, 2009, at 3/256:10 AM , Peter Kanze wrote:
Hello
I have a pagelink that point t
As Andy already pointed, this is normal Tapestry behaviour.
When you have more than onActivate() method, I recommend the use of a
single method receiving an EventContext
(http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/EventContext.html):
onActivate(EventContext event) {
if
e-
> From: Peter Kanze [mailto:peterka...@gmail.com]
> Sent: 25 March 2009 11:11
> To: Tapestry users
> Subject: T5: onActivate called twice
>
> Hello
> I have a pagelink that point to this /products/computer/5
>
> In my Products.java I have two onActivate methods.
Hello
I have a pagelink that point to this /products/computer/5
In my Products.java I have two onActivate methods. See below.
When I click the pageLink I can see that both onActivate are called.
Because this is printed to the output console:
onActivate(String categoryName, int pageNr)
onActivate:
nbul
Subject: Re: t5: onActivate called twice
On Tue, Feb 17, 2009 at 12:02 PM, Angelo Chen
wrote:
> you need a onPassivate to persist the context on the client side if:
You need an onPassivate() method to tell Tapestry what is the
activation context for a given page. This is needed primar
On Tue, Feb 17, 2009 at 12:02 PM, Angelo Chen
wrote:
> you need a onPassivate to persist the context on the client side if:
You need an onPassivate() method to tell Tapestry what is the
activation context for a given page. This is needed primarily because
of redirect-after-post, AFAIK, and every
Hi Thiago,
I just read again that doc, here is what I understand:
you need a onPassivate to persist the context on the client side if:
1. you have a form in the page
2. if you have an action link in the page
correct?
Angelo
Thiago H. de Paula Figueiredo wrote:
>
> On Tue, Feb 17, 2009 at 1
On Tue, Feb 17, 2009 at 10:28 AM, Angelo Chen
wrote:
> Hi Thiago,
Hi!
> I always make sure i have a onPassivate that returns same thing in the
> onActivate,
That's a good thing, returning the the save value, but not necessarily
the same type.
> now, must be wrong, what is the rule of thumb o
Hi Thiago,
I always make sure i have a onPassivate that returns same thing in the
onActivate, now, must be wrong, what is the rule of thumb on this? why we
need a onPassivate?
Thanks,
Angelo
Thiago H. de Paula Figueiredo wrote:
>
> On Tue, Feb 17, 2009 at 10:16 AM, Angelo Chen
>
> You cann
On Tue, Feb 17, 2009 at 10:16 AM, Angelo Chen
wrote:
> Hi Thiago,
Hi, Angelo!
> Thanks for the tip, never knew there is this EventContext, is following
> onPassivate correct:
You cannot return an EventContext in the onPassivate method. You don't
even need to return the same type you received
Hi Thiago,
Thanks for the tip, never knew there is this EventContext, is following
onPassivate correct:
private EventContext ec;
public Object onActivate(EventContext obj) {ec = obj;}
public EventContext onPassivate() { return ec; }
What's the advantage of using EventContext compared to O
On Tue, Feb 17, 2009 at 9:30 AM, Angelo Chen wrote:
> You are correct, in one of my javascript it has a "../images/..", i don't
> know why it got called, in that particular page, there is no reference to
> that js, commenting it out fixes the problem, but this does bring up another
> question, how
Hi,
You are correct, in one of my javascript it has a "../images/..", i don't
know why it got called, in that particular page, there is no reference to
that js, commenting it out fixes the problem, but this does bring up another
question, how to put asset:context in a javascript?
//var tb_pathTo
Most probably you're including images in your page using relative
paths. Use ${asset:context/images/loading.gif} instead and the problem
goes away. ;)
By the way, use EventContext instead of Object[] as the parameter of
your onActivate method. ;)
--
Thiago
--
btw, it is 5.0.18.
Angelo Chen wrote:
>
> Hi,
>
>
>
--
View this message in context:
http://www.nabble.com/t5%3A-onActivate-called-twice-tp22053148p22053292.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
--
Hi,
I have following code, onActivate was called correctly 1st time, but it will
be called again during the rendering and obj[0] has 'images', obj[1]
has 'loading.gif', I do provide a onPassivate, any idea? thanks
private Object[] _objs;
@CommitAfter
public Object onActivate(Object[] o
What version of Tapestry? This was addressed in 5.0.14, I believe, to
ensure that when overriding a base class event handler method, the
method is not invoked twice.
On Mon, Apr 21, 2008 at 6:25 AM, Leon Derks <[EMAIL PROTECTED]> wrote:
> Hi Davor,
>
> Indeed, I have a BasePage that implements th
Hi Leon,
I am facing the same problem with the onActivate() method calling twice.
Did you find any solution for this?
Thanks,
Yees.
-Original Message-
From: Leon Derks [mailto:[EMAIL PROTECTED]
Sent: Monday, April 21, 2008 6:56 PM
To: Tapestry users
Subject: Re: T5: onActivate
Hi Davor,
Indeed, I have a BasePage that implements the public void onActivate()
{}method.
In my subpage I also have implemented the public void onActivate() {}.
The code in onActivate() of my subpage is executed twice.
BASEPAGE:
public void onActivate() {
String pageName = resources.g
you have to be more specific,
same OnActivate method will not be called more than once in normal
circumastances,
but overriding onActivate from a base class I belive can cause this ...
some code would be useful.
Davor Hrg
On Mon, Apr 21, 2008 at 12:41 PM, Leon Derks <[EMAIL PROTECTED]> wrote:
Hi,
I noticed that my onActivate() is called twice.
I solved the problem by changing onActivate() into onActivate(Object[]
parameters).
Now it is only called once. But is this the way to do this or is there a
better way?
greetings,
Leon
--
21 matches
Mail list logo