You probably should use a construct like this:
 
 
            <ft:form action="#{$cocoon/continuation/id}.continue" method="POST" 
> 
              <table style="width: 100%;">
                <thead>
                  <tr>
                    <th class="header" style="width: 5%;"><ft:widget 
id="selectAll"/></th>
                    <th class="header" style="width: 95%;">Topic</th>
                  </tr>
                </thead>
                <ft:repeater id="topics">
                  <tbody>
                    <ft:repeater-rows>
                      <tr>
                        <td><ft:widget id="selectTopic"/></td>
                        <td><ft:widget id="title"/><ft:widget id="id"/></td>    
          
                      </tr>
                    </ft:repeater-rows>
                  </tbody>
                </ft:repeater>
              </table>
              <div style="margin-top:10px;">
                <ft:widget id="viewXML"/>
                <ft:widget id="viewDatasheet"/>                
                <ft:widget id="downloadZIP_eps"/>
                <ft:widget id="downloadZIP_gif"/>                
              </div>
            </ft:form>
 
So instead of using repeaterWidget.getChildren….   Use <ft:repeater-rows>
 
Kind regards,
Robby Pelssers
 
From: Hallmann, Marcel [mailto:marcel.hallm...@six-group.com] 
Sent: Monday, March 22, 2010 4:21 PM
To: dev@cocoon.apache.org
Subject: Performance with jx:foreach?
 
Hi there, 
I do have a problem with my cocoon 2.1.9 application: 
In flowscript I call a Java method which query a SQL statement. 

In the model.xml the widgets for the result table are defined via e.g.: 
<fd:output id="name"> 
  <fd:datatype base="string"> 
  </fd:datatype> 
</fd:output> 

and filled in the bind.xml via: 
<fb:repeater id="list" parent-path="." row-path="elements" direction="load"> 
  <fb:on-bind> 
    <fb:value id="name"                 path="name"             
direction="load"/> 
  </fb:on-bind> 
</fb:repeater> 

The resultset shall be displayed in the template.xml with jx:foreach (which is 
working, but extremly slow): 
<ft:repeater-widget id="list"> 
  <fi:items>   
    <jx:forEach var='column' items="${widget.getChildren()}"> 
      <td><ft:widget id="${columnId}"/></td> (columnId is known) 
    </jx:forEach> 
  </fi:items> 
</ft:repeater-widget> 

I noticed, that a when I call the widget names directly e.g 
<td><ft:widget id="name"/></td> and so on 
and do NOT use the jx:foreach, the performance is much better. 

Do you have tips for me, how I can increase the performance using jx:foreach? 

Thanks for your help!
 
Best regards
The content of this e-mail is intended only for the confidential use of the 
person addressed. 
If you are not the intended recipient, please notify the sender and delete this 
e-mail immediately.
Thank you.

Reply via email to