cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pelssers, Robby, VF-NL" <>
Subject RE: jx template and number format
Date Fri, 07 Apr 2006 05:33:24 GMT
What if you would try something like :

<jx:set var="startItem">${new Double(local.skipResults %

I am assuming here that "local.skipResults % local.bufferSize"  returns
a double.

-----Original Message-----
From: Philippe LAPLANCHE [] 
Sent: donderdag 6 april 2006 21:16
Subject: jx template and number format

I'm so tired of all the problems I have with jx templates ... Am I the
only one to use them or what ? 
I'm beginning to regret that I left xsp for jx:templates

This time, I guess I have a number format problem. My forEach loop
doesn't work fine. The end attribute is not properly taken into account.

I'm using cocoon 2.1.8 on tomcat 5.5 and sun jdk 1.5

Here is how I intend to use forEach :

<jx:forEach var="line" varStatus="status" items="${local.ypResult.rows}"
begin="${startItem}" end="${endItem}">

When I manually put :
<jx:forEach var="line" varStatus="status" items="${local.ypResult.rows}"
begin="0" end="4"> everything works fine this way, but when I use
${startItem} and ${endItem}, I only get one <item>

Here's how I define startItem and endItem :
<jx:set var="startItem">${(local.skipResults %
local.bufferSize)}</jx:set> <jx:set var="endItem">${(local.skipResults %

So I put this in my code :

And I get 

So I guess I have a number formatting problem here. But after trying to
use parseInt() and Integer.intValue() with no success, well I'm stuck

Can someone please help me ?


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message