cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Molnar <mp...@nanasoft.hu>
Subject Re: JXTemplate forEach assigns entire list to current
Date Mon, 21 Feb 2011 18:44:42 GMT


On 02/19/2011 06:52 PM, Robby Pelssers wrote:
> For all I know you're using the forEach incorrect.
>
> <jx:forEach select="#{$cocoon/parameters/initSources}" varStatus="status">
>    <jx:out value="#{$status/current}"/>
> </jx:forEach>

This is perfectly correct, straight from the documentation, but in 
JXPath syntax, which is slightly different than Jexl. I guess it has 
only worked because of the different semantics of the expression.

varStatus contains the status variable, which can be used to access 
various iteration parameters regardless of which syntax you use.

http://cocoon.apache.org/2.2/blocks/template/1.0/1391_1_1.html

See forEach.

--
Peter

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


Mime
View raw message