You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by tapestry5 <bi...@gmail.com> on 2008/06/24 23:08:18 UTC

dynamic link in actionlink

I have a scenario where I am creating multiple actionlink in a loop. But I
want to use the same id for all the actionlinks.

Test.jsp

<t:loop source="studentlist" value="student">
<t:actionlink id="rank" context="student.id"> rank
${student.rank}</t:actionlink>
</t:loop> 


So in my Test.java I have

Object onActionFromRank(final long _ student)
{
	Now here I am getting student.id but I also want selected rank. I don’t
know how to get selected rank from .tml. This is not inside form.

}

-- 
View this message in context: http://www.nabble.com/dynamic-link-in-actionlink-tp18100111p18100111.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: dynamic link in actionlink

Posted by Geoff Callender <ge...@gmail.com>.
Alternatively, if you like this kind of syntax
	context="list:student.id,student.rank"
then contribute a ListBindingFactory to AppModule as described in http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefix 
  .

On 25/06/2008, at 7:18 AM, Sven Homburg wrote:

> read the bottom of this page
> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ActionLink.html
>
> 2008/6/24 tapestry5 <bi...@gmail.com>:
>
>>
>> I have a scenario where I am creating multiple actionlink in a  
>> loop. But I
>> want to use the same id for all the actionlinks.
>>
>> Test.jsp
>>
>> <t:loop source="studentlist" value="student">
>> <t:actionlink id="rank" context="student.id"> rank
>> ${student.rank}</t:actionlink>
>> </t:loop>
>>
>>
>> So in my Test.java I have
>>
>> Object onActionFromRank(final long _ student)
>> {
>>       Now here I am getting student.id but I also want selected  
>> rank. I
>> don't
>> know how to get selected rank from .tml. This is not inside form.
>>
>> }
>>
>> --
>> View this message in context:
>> http://www.nabble.com/dynamic-link-in-actionlink-tp18100111p18100111.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> -- 
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
> http://chenillekit.googlecode.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: dynamic link in actionlink

Posted by Sven Homburg <ho...@googlemail.com>.
read the bottom of this page
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ActionLink.html

2008/6/24 tapestry5 <bi...@gmail.com>:

>
> I have a scenario where I am creating multiple actionlink in a loop. But I
> want to use the same id for all the actionlinks.
>
> Test.jsp
>
> <t:loop source="studentlist" value="student">
> <t:actionlink id="rank" context="student.id"> rank
> ${student.rank}</t:actionlink>
> </t:loop>
>
>
> So in my Test.java I have
>
> Object onActionFromRank(final long _ student)
> {
>        Now here I am getting student.id but I also want selected rank. I
> don't
> know how to get selected rank from .tml. This is not inside form.
>
> }
>
> --
> View this message in context:
> http://www.nabble.com/dynamic-link-in-actionlink-tp18100111p18100111.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com