cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oguz Kologlu" <>
Subject JXTemplateGenerator / JX macro bug
Date Fri, 16 Jan 2004 02:36:51 GMT
Hi all,

I'm using the latest 2.1 JXTemplateGenerator (cvs tag 1.30) and the JX Macros 
Christopher Oliver orignally wrote.

There appears to be a problem with widgets that contains styling information
when the jxtemplategenerator processes them.

<wt:widget id="notes">
  <wi:styling type="textarea" rows="4" style="width:100%"/>

Will be processed as:

<wi:field id="notes" required="false"/>
<wi:styling type="textarea" rows="4" style="width:100%"/>

(NOTE: two seperate elements..)

It would appear that:

  widget.generateSaxFragment(cocoon.consumer, locale)

in the macro is not outputing the <wi:styling ..> until
after it has finished processing <wt:widget ...> which then
results in the field being output as:

<input name="notes">

instead of the required:
<texterea name="notes">

Is there some workaround to this?


See full macro below:
<jx:macro name="widget" \
targetNamespace="">  <jx:parameter \
name="id"/>  <jx:set var="widget" value="${woodyCurrent.getWidget(id)}"/>
    <jx:when test="${widget.getSize() != null}"> <!-- repeater -->
       <jx:set var="lastRow" value="${widget.getSize() - 1}"/>
       <jx:forEach varStatus="loop" begin="0" end="${lastRow}">
           <jx:set var="woodyCurrent" value="${widget.getRow(loop.index)}"/>
           ${row.generateSaxFragment(cocoon.consumer, locale)}
       ${widget.generateSaxFragment(cocoon.consumer, locale)}

View raw message