cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Brosich <>
Subject Converting string to array in jxtemplategenerator
Date Thu, 31 Aug 2006 08:24:32 GMT

I need to convert a string (words delimited with commas) in something 
that "jx:forEach" can iterates.
I found a nice example in documentation 

<jx:macro name="forTokens">
  <jx:parameter name="var"/>
  <jx:parameter name="items"/>
  <jx:parameter name="delims"/>
  <jx:forEach var="${var}" 
         items="${java.util.StringTokenizer(items, delims)}">

<forTokens var="letter" items="a,b,c,d,e,f,g" delims=",">
  letter = ${letter} <br/>

I try it and something simpler:

<jx:forEach var="field" 
   <rfc:row id="${status.count}">
        <rfc:field name="FIELDNAME">${field}</rfc:field>

Both doesn't work; field variable has never a value.

What's wrong? Is there another way?


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

View raw message