You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by dhning <dh...@gaonline.com.cn> on 2008/04/10 12:43:38 UTC
How to know which sub component trigger an action and also be aware of the action parameters?
Hi,
One case: The page start.tml contains component ParentComponent, and template of ParentComponent contains two action links LinkA&LinkB, context of LinkA is "a" while LinkB is "b".
In start.java, I need to perform some special logic by which link is clicked.
In T4, I knew listener binding meets this requirement, but how to handle it in T5. For event mechanism of T5, till now I can write method onActionFormParentComponent to handle all action events, but I don't know which link is clicked and can't get the context parameters.
Please help.
Thanks in advance.
Re: How to know which sub component trigger an action and also be
aware of the action parameters?
Posted by Stephane Decleire <sd...@cariboo-networks.com>.
If you want to handle your links in start.java, you could use eventlink
instead of actionlink and give each link a different event ...
Stephane
dhning a écrit :
> Hi,
>
> One case: The page start.tml contains component ParentComponent, and template of ParentComponent contains two action links LinkA&LinkB, context of LinkA is "a" while LinkB is "b".
>
> In start.java, I need to perform some special logic by which link is clicked.
> In T4, I knew listener binding meets this requirement, but how to handle it in T5. For event mechanism of T5, till now I can write method onActionFormParentComponent to handle all action events, but I don't know which link is clicked and can't get the context parameters.
>
> Please help.
>
> Thanks in advance.