Can you share the code of "mycomponent"? I suspect you are persisting the value 
in stead of adding it to the context right away. And do you have a form around 
this loop?

Cheers,
Joost


On Dec 3, 2012, at 1:50 PM, dodjavola wrote:

> 'm currently working on some project, using Apache Tapestry 5.3.6. I have
> issue using t:loop component. Is there any way I can get selected item after
> loop finishes, and page is rendered? What I need to achieve is: Let's say I
> have loop like this:
> 
> <t:loop t:source="itemList" t:value="item">
>    <t:actionlink id="something" context="item.ID"></t:actionlink>
> </t:loop>
> This will work fine. But if I move this actionlink into my own component,
> and pass this ID through my parameter, if I click, I always get the last
> item from list, and not the one which is clicked.
> 
> <t:loop t:source="itemList" t:value="item">
>    <t:mycomponent myparameter="item.ID"></t:mycomponent>
> </t:loop>
> 
> I tried putting formState="iteration", and puting ValueEncoder, but nothing
> helps. Please, can anyone help me, and show me how to solve this issue, and
> get the selected item from the list. Thanks in advance
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Get-selected-item-from-loop-tp5718460.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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