You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Sabine K." <la...@gmail.com> on 2007/04/18 10:40:59 UTC
T5: How to acces to an array from loop?
Hello,
i have this:
<table>
<t:form t:id="form">
<t:loop source="1.16" value="row">
<tr>
<t:loop source="1..4" value="column">
<td>${column} ${row}</td>
</t:loop>
</tr>
</t:loop>
</t:form>
</table>
In the class there is an array: _information[4][16]. How can i get the
values out of the array in the right rows and columns?
Best regards, Sabine
--
View this message in context: http://www.nabble.com/T5%3A-How-to-acces-to-an-array-from-loop--tf3599642.html#a10054552
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: How to acces to an array from loop?
Posted by Massimo Lusetti <ml...@gmail.com>.
On 4/18/07, Sabine K. <la...@gmail.com> wrote:
> In the class there is an array: _information[4][16]. How can i get the
> values out of the array in the right rows and columns?
Look at the index Loop's parameter
--
Massimo
http://meridio.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Antwort: T5: How to acces to an array from loop?
Posted by Kristian Marinkovic <kr...@porsche.co.at>.
the loop component provides an "index" parameter that contains
the current iteration...
<t:loop source="1..16" index="row_count" >
<tr>
<t:loop source="1..4" index="column_count">
<td>${value}</td>
</t:loop>
</tr>
</t:loop>
public Object getValue() {
return _information[row_count][column_count];
}
g,
kris
"Sabine K." <la...@gmail.com>
18.04.2007 10:40
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>
An
users@tapestry.apache.org
Kopie
Thema
T5: How to acces to an array from loop?
Hello,
i have this:
<table>
<t:form t:id="form">
<t:loop source="1.16" value="row">
<tr>
<t:loop source="1..4" value="column">
<td>${column} ${row}</td>
</t:loop>
</tr>
</t:loop>
</t:form>
</table>
In the class there is an array: _information[4][16]. How can i get the
values out of the array in the right rows and columns?
Best regards, Sabine
--
View this message in context:
http://www.nabble.com/T5%3A-How-to-acces-to-an-array-from-loop--tf3599642.html#a10054552
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