You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/09/21 10:45:26 UTC
T5: nested loop
Hi,
I have a nested loop to create a table, the data displayed is from a List of
12 elements:
<table>
<t:loop source="1..3" >
<tr>
<t:loop source="1..4">
<td >element of List to be displayed here</td>
</t:loop>
</tr>
</t:loop>
</table>
Since the List is not directly specified as source, I can't use value to
access its current elelement, any way to access the element in the loop?
thanks.
A.C.
--
View this message in context: http://www.nabble.com/T5%3A-nested-loop-tf4492636.html#a12813039
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: T5: nested loop
Posted by Angelo Chen <an...@yahoo.com.hk>.
got it, thanks.
Nick Westgate wrote:
>
> Uh, add a Java accessor which multiplies them?
> Really this is totally up to your domain model.
>
> Cheers,
> Nick.
>
>
--
View this message in context: http://www.nabble.com/T5%3A-nested-loop-tf4492636.html#a12814643
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: T5: nested loop
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Uh, add a Java accessor which multiplies them?
Really this is totally up to your domain model.
Cheers,
Nick.
Angelo Chen wrote:
> Hi Robin,
>
> if I do that, then I'll have :
>
> <t:loop source="1..3" value="outerLoopValue">
> <t:loop source="1..4" value="innerLoopValue">
>
> now, how to uses these two values to access the element of List of size 12?
>
>
> Robin Helgelin wrote:
>> On 9/21/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>>> Hi,
>>> I have a nested loop to create a table, the data displayed is from a List
>>> of
>>> 12 elements:
>>>
>>> <table>
>>> <t:loop source="1..3" >
>>> <tr>
>>> <t:loop source="1..4">
>>> <td >element of List to be displayed here</td>
>>> </t:loop>
>>> </tr>
>>> </t:loop>
>>> </table>
>>>
>>> Since the List is not directly specified as source, I can't use value to
>>> access its current elelement, any way to access the element in the loop?
>>> thanks.
>> You can always define value, <t:loop source="1..3"
>> value="outerLoopValue">, and use that.
>>
>> --
>> regards,
>> Robin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: nested loop
Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Robin,
if I do that, then I'll have :
<t:loop source="1..3" value="outerLoopValue">
<t:loop source="1..4" value="innerLoopValue">
now, how to uses these two values to access the element of List of size 12?
Robin Helgelin wrote:
>
> On 9/21/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>>
>> Hi,
>> I have a nested loop to create a table, the data displayed is from a List
>> of
>> 12 elements:
>>
>> <table>
>> <t:loop source="1..3" >
>> <tr>
>> <t:loop source="1..4">
>> <td >element of List to be displayed here</td>
>> </t:loop>
>> </tr>
>> </t:loop>
>> </table>
>>
>> Since the List is not directly specified as source, I can't use value to
>> access its current elelement, any way to access the element in the loop?
>> thanks.
>
> You can always define value, <t:loop source="1..3"
> value="outerLoopValue">, and use that.
>
> --
> regards,
> Robin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/T5%3A-nested-loop-tf4492636.html#a12813996
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: T5: nested loop
Posted by Robin Helgelin <lo...@gmail.com>.
On 9/21/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>
> Hi,
> I have a nested loop to create a table, the data displayed is from a List of
> 12 elements:
>
> <table>
> <t:loop source="1..3" >
> <tr>
> <t:loop source="1..4">
> <td >element of List to be displayed here</td>
> </t:loop>
> </tr>
> </t:loop>
> </table>
>
> Since the List is not directly specified as source, I can't use value to
> access its current elelement, any way to access the element in the loop?
> thanks.
You can always define value, <t:loop source="1..3"
value="outerLoopValue">, and use that.
--
regards,
Robin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org