#Cyrille37# wrote:
Thank you François,

The problem is not on the component context, but on the component id.
Oups ^^
I think a listener concept is missing !

Another example :
(This code is invalid because of the duplicate component id)
<html>
   <t:actionlink t:id="want2beRich" context="true">YES</t:actionlink>
   <t:actionlink t:id="want2beRich" context="false">YES</t:actionlink>
</html>
<java>
   Object onActionFromWant2beRich( boolean yes )
   {
      ...
   }
</java>
Ok, now I better understand your concern. You would have a kind of group notion for action event ?
Somethink like that :
8<----------------------
<t:actionlink t:gid="want2beRich" t:id="foo" context="true">YES</t:actionlink> <t:actionlink t:gid="want2beRich" t:id="bar" context="false">YES</t:actionlink>
8<----------------------
And the event handler "onActionFromFoo" match first link, "onActionFromBar" match second link, and "onActionFromWant2beRich" match both.

I don't think this kink of feature exists for now, but you can take advantage of event "bubbling" to achieve your need : just create a trivial component "Want2beRich" :
8<----------------------
java:
public class Want2beRich {}
html:
<div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
<t:actionlink context="true">YES</t:actionlink>
<t:actionlink context="false">NO</t:actionlink>
</div>
8<----------------------
and use it on your parent component/page : <t:want2berich/>, with the corresponding event handler "onActionFromWant2berich".

Well, it seems that the risk is to have a batch of component with this solution...
Nonetheless, I hope it will help you.


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

Reply via email to