Francois Armand a écrit :
#Cyrille37# wrote:
In another way to explain,
I would like to make "by hand" the same work than a t:actionLink in a t:loop

the code :
<t:loop source="1..10" value="guess">
   <t:actionlink t:id="guess" context="guess">${guess}</t:actionlink>
</t:loop>
create several links like :
   /do.guess/4
   /do.guess/6
   /do.guess/7

So, howto do the same "by hand" (without a loop) ???
You can use list in context. For example, if you have a
List<string>getGuessContexte() {
   List<String> list = new ArrayList<String>();
   list.add("plop");
   list.add(new Integer(guess).toString());
   return list;
}
In your :
<t:actionlink t:id="guess" context="guesscontext">${guess}</t:actionlink>

You will have link : .../do./guess/plop/0, .../do.guess/plop/1 etc.

See http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#org.apache.tapestry.corelib.components.actionlink
Thank you François,

The problem is not on the component context, but on the component id.
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>

Perhaps I've missed some essential concept ??

cheers
cyrille.

Well, if anybody as an idea about how to do this kind of think with submit button, I'm interested :)

Francois


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





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

Reply via email to