I have a set of nested Beans, from with I am trying to extract values using JXTemplate.

album - an Album Bean
        title - String
        text - String
        . . .
        resources - ArrayList of Resource Beans
                artefact - String
                text - String
                images - ArrayList of Image Beans
                        image - String
                . . .

Here is part of the Template :

<t:forEach items="#{album/resources}">
<section>
<title>
<a href="../artefacts/work(#{artefact}).html" title="view the full artefact">
<!-- snip -->
</a>
</title>
<p>IMAGES: #{count(images)}</p> <!-- this reports 2 images -->
<t:forEach items="#{images}"> <!-- this throws an exception -->
<a href="../artefacts/image(#{image}).html" title="view information about this image">
<img alt="image: #{image}" src="../images/thumbnail/artefacts/#{image}.jpg"/>
</a><xsl:text>&#160;</xsl:text>
</t:forEach>
<p title="albums.album.commentary" i18n:attr="title">#{text}</p>
</section>
</t:forEach>

This all works fine if I take out the inner 'forEach'.
When I leave it in I get the far from helpful (currently in 2.1.4-dev, generic) Exception:

org.apache.cocoon.ProcessingException: Generator already set. Cannot set generator 'jx' at file:/Users/jerm/Development/Checkouts/someproject/webapp/album.xmap: 37:62
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setGene rator(AbstractProcessingPipeline.java:243)
at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe line.setGenerator(AbstractCachingProcessingPipeline.java:158)

etc.

What I do not understand is that this works :
        #{count(images)}
But this throws exceptions :
        <t:forEach items="#{images}">

Any suggestions?
I have tried all of the variations in the documentation and User's List that I could find.

thanks

regards Jeremy

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to