I'm guessing the answer to question 1 is related to the docs here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
"Currently, methods are sorted alphabetically. Methods with the same name are sorted by number of parameters. Even so, this is not a great idea ... just define one method, and have it call the other methods in the order you desire." Unfortunately this means that, unless your happy to use a list argument to onActivate, the setting of variables needs to be done defensively i.e. "if not already set then set it".


Any takers for question 2 below would be most appreciated!



Joel Halbert wrote:
Hi,

2 questions re: the activation context:

1. Why is onActivate called multiple times?
If I have two onActivate methods:

void onActivate(int inventoryId)
void onActivate(int inventoryId,  Map<String, String> params)

then for a link which presents both arguments in it's activation context I see that the method with both arguments is called, but then the method with just one (the first) argument is also again. Is this expected?


2. I have a form with an activation context:
<t:form class="sortbyform" t:id="sort" t:context="list:inventoryId,params">

In my page class I have the following methods:

void onActivate(int inventoryId){...}

void onActivate(int inventoryId,  Map<String, String> params){...}

@OnEvent(value="submit", component="sortbyform")
public void onSubmitForm(int inventoryId, Map<String, String> params) {...}


When the form is submitted the first and third methods are called, but not the second....is this expected and if so why? I would have expected that the second not first method would be called, along with the third.

Thx
Joel



--
SU3 Analytics Ltd
61b Oxford Gardens
W10 5UJ
London

Tel: +44 20 8960 2634
Mob: +44 75 2501 0825
www.su3analytics.com

SU3 Analytics Ltd is a company registered in England and Wales under company 
number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ, 
United Kingdom.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to