cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Delort" <Stephane.Del...@edag.de>
Subject JXtemplqte macro not interpreted
Date Thu, 05 Aug 2004 07:13:00 GMT
Hi,


first of all Mark, thank you for the url on the cocoon website, it did the
job very well.


I made a JXtemplate file and everything is ok as far as I do not use
jx:macro.

I tried with the sample from the cocoon web site and here is what I have :



Flowscript: ***********************************************

data.greatlakes = ["Superior", "Michigan", "Huron", "Erie", "Ontario"];
cocoon.sendPage("book.jx", data);

My jxtemplate : ************************************************

<?xml version="1.0"?>

<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
<...>
<tablerows list="${greatlakes}" color="blue"/>
<...>

<jx:macro name="tablerows">
  <jx:parameter name="list"/>
  <jx:parameter name="color"/>
  <jx:forEach var="item" items="${list}">
    <tr><td bgcolor="${color}">${item}</td></tr>
  </jx:forEach>
</jx:macro>

</jx:template>

The result : ******************************************************

<tablerows list="org.mozilla.javascript.NativeArray@788315" color="blue" />

I really don't know what is the problem here, as I follow the sample.
Also if I put the macro instructions directly into the "core" everything works fine but then
my code won't be easily readable


thamks in advance,
Stephane






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


Mime
View raw message