You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stephane Delort <St...@edag.de> on 2004/08/05 09:13:00 UTC

JXtemplqte macro not interpreted

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