Philippe LAPLANCHE wrote:
> In my JXTemplate, this expression returns nothing:
>
> ${account.payer.lines[5].CL1data.CL1_NUMLIG}
>
> But in my flow, just before I call the sendPage() function, this
> expression gives an int (I checked with the debugger)
>
> My object seems to be correctly passed and the arrays of lines is really
> there. Here's how I know :
>
> <jx:forEach var="line" varStatus="status" items="${account.payer.lines}"
> ${line.CL1data.CL1_NUMLIG} <br/>
> </jx:forEach>
>
> This returns a list with all the data I need.
>
> Can someone understand what is happening here?
>
> I'm using Cocoon 2.1.8 under win XP with Tomcat 5.5 and SUN JDK 1.5
When you say "array"... what exactly is the lines object? A true Java
Array? A JavaScript array you created in flowscript? Something else?
In my experience JXPath expressions are more flexible in the kinds of
objects they know how to traverse, compared to Jexl expressions. Try:
#{account/payer/lines[6]/CL1data/CL1_NUMLIG} and see if it has any
better luck. Keep in mind [n] indexes in XPath are 1-based.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]