Brilliant idea, it works. i have to remove 'literal:' to make it work. thanks
for the tip.


Taha Hafeez wrote
> 
> One solution will be 
> 
> <t:loop source='literal:1..5' value='index'>
>  ${row}..
> </t:loop>
> 
> <t:loop source='literal:6..10' value='index'>
> ${row}
> </t:loop>
> 
> 
> @Property
> private int index;
> 
> public Item getRow(){
>    return myList.get(index);
> }
> 
> regards
> Taha
> 
> On Aug 3, 2012, at 7:29 AM, Angelo C. wrote:
> 
>> I have this list of 10, and I need to have two loops for two tables in
>> the
>> page, one is from 1 to 5 and another is 6 to 10, side by side, my
>> approach
>> now is two functions getRows1() and getRows2(), so the list is splited in
>> code, was just thinking maybe Loop has this feature?
>> 
>> 
>> Thiago H de Paula Figueiredo wrote
>>> 
>>> On Thu, 02 Aug 2012 22:15:35 -0300, Angelo C. &lt;angelochen960@&gt;  
>>> wrote:
>>> 
>>>> Hi,
>>> 
>>> Hi!
>>> 
>>>> Can component loop have a starting index? say I have a source of 10,
>>>> and  
>>>> I'd like to loop from 1 to 5, and another Loop from 6 to 10, possible?
>>> 
>>> What are you trying to do? The Loop's index parameter always starts from
>>> 0  
>>> and it's not possible to change that, but it's very, very easy to have a  
>>> getRealIndex() (or any other method name) that returns the index summed  
>>> with some offset.
>>> 
>>> -- 
>>> Thiago H. de Paula Figueiredo
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@.apache
>>> For additional commands, e-mail: users-help@.apache
>>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Loop-and-starting-index-tp5715014p5715019.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@.apache
>> For additional commands, e-mail: users-help@.apache
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@.apache
> For additional commands, e-mail: users-help@.apache
> 




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Loop-and-starting-index-tp5715014p5715023.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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

Reply via email to