You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Antonio Ordoñez <an...@star-group.net> on 2008/09/16 11:11:04 UTC
Problem with a loop
Hi all.
I have a problem with a loop component in my program. I have something
like this in the tml:
<t:loop source="1..${item.depth}" value="index">${index}...</t:loop>
And in the java I have:
@Property
private Node item;
@Property
private int index;
....
In the Node class:
protected int depth;
Thank you very much in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: Problem with a loop
Posted by Jonathan Barker <jo...@gmail.com>.
I thought there might have been the intention to support this syntax, but I
know that it definitely was not supported before.
I hit this once and used a Range object for the source. Check out
org.apache.tapestry5.internal.util.IntegerRange
> -----Original Message-----
> From: Antonio Ordoñez [mailto:antonio.ordonez@star-group.net]
> Sent: Tuesday, September 16, 2008 05:50
> To: Tapestry users
> Subject: Re: Problem with a loop
>
> Yes, sorry. The mistake that I obtain is:
> Render queue error in BeginRender[Index:treecomponent.loop_0]: Failure
> writing parameter 'value' of component Index:treecomponent.loop_0:
> Coercion of 1..1 to type int (via String --> Long, Long --> Integer)
> failed: For input string: "1..1"
>
> Thank you very much.
>
> Greetings.
>
>
> Martijn Brinkers wrote:
>
> >I think you forgot to add what the actual problem is ;-)
> >
> >Please be more specific
> >
> >Martijn
> >
> >On Tue, 2008-09-16 at 11:11 +0200, Antonio Ordoñez wrote:
> >
> >
> >>Hi all.
> >>
> >>I have a problem with a loop component in my program. I have something
> >>like this in the tml:
> >><t:loop source="1..${item.depth}" value="index">${index}...</t:loop>
> >>
> >>And in the java I have:
> >>
> >> @Property
> >> private Node item;
> >>
> >> @Property
> >> private int index;
> >>
> >>....
> >>In the Node class:
> >>
> >> protected int depth;
> >>
> >>
> >>
> >>Thank you very much in advance.
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
> >
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problem with a loop
Posted by Antonio Ordoñez <an...@star-group.net>.
Yes, sorry. The mistake that I obtain is:
Render queue error in BeginRender[Index:treecomponent.loop_0]: Failure
writing parameter 'value' of component Index:treecomponent.loop_0:
Coercion of 1..1 to type int (via String --> Long, Long --> Integer)
failed: For input string: "1..1"
Thank you very much.
Greetings.
Martijn Brinkers wrote:
>I think you forgot to add what the actual problem is ;-)
>
>Please be more specific
>
>Martijn
>
>On Tue, 2008-09-16 at 11:11 +0200, Antonio Ordoñez wrote:
>
>
>>Hi all.
>>
>>I have a problem with a loop component in my program. I have something
>>like this in the tml:
>><t:loop source="1..${item.depth}" value="index">${index}...</t:loop>
>>
>>And in the java I have:
>>
>> @Property
>> private Node item;
>>
>> @Property
>> private int index;
>>
>>....
>>In the Node class:
>>
>> protected int depth;
>>
>>
>>
>>Thank you very much in advance.
>>
>>
>>
>>---------------------------------------------------------------------
>>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: Problem with a loop
Posted by Martijn Brinkers <ma...@gmail.com>.
I think you forgot to add what the actual problem is ;-)
Please be more specific
Martijn
On Tue, 2008-09-16 at 11:11 +0200, Antonio Ordoñez wrote:
> Hi all.
>
> I have a problem with a loop component in my program. I have something
> like this in the tml:
> <t:loop source="1..${item.depth}" value="index">${index}...</t:loop>
>
> And in the java I have:
>
> @Property
> private Node item;
>
> @Property
> private int index;
>
> ....
> In the Node class:
>
> protected int depth;
>
>
>
> Thank you very much in advance.
>
>
>
> ---------------------------------------------------------------------
> 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