mirko wrote:
Is there a way to get recursive processing in JXTemplate? I need to
make hierarchical structure in the document. Or maybe I should flatten
the structure in my logic beans and then process it with simple
'for each' statement.
You can use a recursive macro:
<jx:macro name="subtree">
<jx:parameter name="classes" optional="false"/>
<jx:forEach select="${classes}">
<class id="#{id}">
<name>#{name}</name>
<subtree classes="#{children}"/>
</class>
</jx:forEach>
</jx:macro>
<jx:forEach select="#{classes}">
<class id="#{id}">
<name>#{name}</name>
<subtree classes="#{children}"/>
</class>
</jx:forEach>
Ugo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]