You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Philipp Rech <ph...@gmx.de> on 2004/11/10 18:32:31 UTC
JX-Template with repeater data... how to?
hello Cocooner's!
i have a problem: want to display data from a repetar widget in a
JX-Template. So data is passed to the template via a Flow:
---------------------------------------------------------------
form2.showForm("goods");
var model2 = form2.getModel();
cocoon.sendPageAndWait("confrim_goods", {"model": model2});
--------------------------------------------------------------
with works fine with usual c-forms and jx-tempalets
where i adress them like:
--------------------------------------------------------------
<div>>${model.WIDGET_NAME}</div>
--------------------------------------------------------------
but how can i do the same with a repeater
(the c-forms tempalte is this):
-------------------------------------------------------------
<ft:widget-label id="goods"/><br/>
<ft:repeater-size id="goods"/>-
<table border="1">
<tr>
<th><ft:repeater-widget-label id="goods" widget-id="goodsMaterialId"/></th>
<th><ft:repeater-widget-label id="goods" widget-id="description"/></th>
<th><ft:repeater-widget-label id="goods" widget-id="amount"/></th>
<th><ft:repeater-widget-label id="goods" widget-id="unit"/></th>
<th><ft:repeater-widget-label id="goods" widget-id="confiscate"/></th>
<th><ft:repeater-widget-label id="goods"
widget-id="assignAbleToPerson"/></th>
<th><ft:repeater-widget-label id="goods" widget-id="select"/></th>
</tr>
<ft:repeater-widget id="goods">
<tr>
<td><ft:widget id="goodsMaterialId"/></td>
<td><ft:widget id="description"/></td>
<td><ft:widget id="amount"/></td>
<td><ft:widget id="unit"/></td>
<td><ft:widget id="confiscate"/></td>
<td><ft:widget id="assignAbleToPerson"/></td>
<td><ft:widget id="select"/></td>
</tr>
</ft:repeater-widget>
<tr>
<td colspan="4" align="right">
<ft:widget id="addgood"/>
<ft:widget id="removegood"/>
</td>
</tr>
</table>
</fi:items>
-------------------------------------------------------------------
and the JX-Tempalte THAT DOES NOT WORK is this:
-------------------------------------------------------------------
<table border="1">
<tr>
<th>goodsMaterialId</th>
<th>description</th>
<th>amount</th>
<th>unit</th>
<th>confiscate</th>
<th>assignAbleToPerson</th>
</tr>
<jx:forEach select="#{????????}">
<tr>
<td>${model.goodsMaterialId}</td>
<td>${model.description}</td>
<td>${model.amount}</td>
<td>${model.unit}</td>
<td>${model.confiscate}</td>
<td>${model.assignAbleToPerson}</td>
</tr>
</jx:forEach>
-------------------------------------------------------------------
i do not know what to put in the <jx:forEach select="#{????????}">
to adress the goods elements of the model....
Thanks in davance, thanks a lot indeed!
phil-
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: JX-Template with repeater data... how to?
Posted by Philipp Rech <ph...@gmx.de>.
>>> Instead of FormTemplateTransformer use template.jx macro library for
>>> CForms.
>>>
uhh, i have no idea what that is or how to use the "template.jx macro
library". Could someone explane please? Is the way i've tried it wrong? (see
below)thanks a lot for your help and a great weekend to all of you!
phil-
> Philipp Rech wrote:
> > hello Cocooner's!
> >
> > i have a problem: want to display data from a repetar widget in a
> > JX-Template. So data is passed to the template via a Flow:
> > ---------------------------------------------------------------
> > form2.showForm("goods");
> > var model2 = form2.getModel();
> > cocoon.sendPageAndWait("confrim_goods", {"model": model2});
> > --------------------------------------------------------------
> > with works fine with usual c-forms and jx-tempalets
> > where i adress them like:
> > --------------------------------------------------------------
> > <div>>${model.WIDGET_NAME}</div>
> > --------------------------------------------------------------
> > but how can i do the same with a repeater
> > (the c-forms tempalte is this):
> > -------------------------------------------------------------
> > <ft:widget-label id="goods"/><br/>
> > <ft:repeater-size id="goods"/>-
> > <table border="1">
> > <tr>
> > <th><ft:repeater-widget-label id="goods"
> widget-id="goodsMaterialId"/></th>
> > <th><ft:repeater-widget-label id="goods" widget-id="description"/></th>
> > <th><ft:repeater-widget-label id="goods" widget-id="amount"/></th>
> > <th><ft:repeater-widget-label id="goods" widget-id="unit"/></th>
> > <th><ft:repeater-widget-label id="goods" widget-id="confiscate"/></th>
> > <th><ft:repeater-widget-label id="goods"
> > widget-id="assignAbleToPerson"/></th>
> > <th><ft:repeater-widget-label id="goods" widget-id="select"/></th>
> > </tr>
> > <ft:repeater-widget id="goods">
> > <tr>
> > <td><ft:widget id="goodsMaterialId"/></td>
> > <td><ft:widget id="description"/></td>
> > <td><ft:widget id="amount"/></td>
> > <td><ft:widget id="unit"/></td>
> > <td><ft:widget id="confiscate"/></td>
> > <td><ft:widget id="assignAbleToPerson"/></td>
> > <td><ft:widget id="select"/></td>
> > </tr>
> > </ft:repeater-widget>
> > <tr>
> > <td colspan="4" align="right">
> > <ft:widget id="addgood"/>
> > <ft:widget id="removegood"/>
> > </td>
> > </tr>
> > </table>
> > </fi:items>
> > -------------------------------------------------------------------
> > and the JX-Tempalte THAT DOES NOT WORK is this:
> > -------------------------------------------------------------------
> > <table border="1">
> > <tr>
> > <th>goodsMaterialId</th>
> > <th>description</th>
> > <th>amount</th>
> > <th>unit</th>
> > <th>confiscate</th>
> > <th>assignAbleToPerson</th>
> > </tr>
> > <jx:forEach select="#{????????}">
> > <tr>
> > <td>${model.goodsMaterialId}</td>
> > <td>${model.description}</td>
> > <td>${model.amount}</td>
> > <td>${model.unit}</td>
> > <td>${model.confiscate}</td>
> > <td>${model.assignAbleToPerson}</td>
> > </tr>
> > </jx:forEach>
> > -------------------------------------------------------------------
> >
> > i do not know what to put in the <jx:forEach select="#{????????}">
> > to adress the goods elements of the model....
> >
> > Thanks in davance, thanks a lot indeed!
> > phil-
> Instead of FormTemplateTransformer use template.jx macro library for
> CForms.
>
> --
> Leszek Gawron lgawron@mobilebox.pl
> Project Manager MobileBox sp. z o.o.
> +48 (61) 855 06 67 http://www.mobilebox.pl
> mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: JX-Template with repeater data... how to?
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Philipp Rech wrote:
> hello Cocooner's!
>
> i have a problem: want to display data from a repetar widget in a
> JX-Template. So data is passed to the template via a Flow:
> ---------------------------------------------------------------
> form2.showForm("goods");
> var model2 = form2.getModel();
> cocoon.sendPageAndWait("confrim_goods", {"model": model2});
> --------------------------------------------------------------
> with works fine with usual c-forms and jx-tempalets
> where i adress them like:
> --------------------------------------------------------------
> <div>>${model.WIDGET_NAME}</div>
> --------------------------------------------------------------
> but how can i do the same with a repeater
> (the c-forms tempalte is this):
> -------------------------------------------------------------
> <ft:widget-label id="goods"/><br/>
> <ft:repeater-size id="goods"/>-
> <table border="1">
> <tr>
> <th><ft:repeater-widget-label id="goods" widget-id="goodsMaterialId"/></th>
> <th><ft:repeater-widget-label id="goods" widget-id="description"/></th>
> <th><ft:repeater-widget-label id="goods" widget-id="amount"/></th>
> <th><ft:repeater-widget-label id="goods" widget-id="unit"/></th>
> <th><ft:repeater-widget-label id="goods" widget-id="confiscate"/></th>
> <th><ft:repeater-widget-label id="goods"
> widget-id="assignAbleToPerson"/></th>
> <th><ft:repeater-widget-label id="goods" widget-id="select"/></th>
> </tr>
> <ft:repeater-widget id="goods">
> <tr>
> <td><ft:widget id="goodsMaterialId"/></td>
> <td><ft:widget id="description"/></td>
> <td><ft:widget id="amount"/></td>
> <td><ft:widget id="unit"/></td>
> <td><ft:widget id="confiscate"/></td>
> <td><ft:widget id="assignAbleToPerson"/></td>
> <td><ft:widget id="select"/></td>
> </tr>
> </ft:repeater-widget>
> <tr>
> <td colspan="4" align="right">
> <ft:widget id="addgood"/>
> <ft:widget id="removegood"/>
> </td>
> </tr>
> </table>
> </fi:items>
> -------------------------------------------------------------------
> and the JX-Tempalte THAT DOES NOT WORK is this:
> -------------------------------------------------------------------
> <table border="1">
> <tr>
> <th>goodsMaterialId</th>
> <th>description</th>
> <th>amount</th>
> <th>unit</th>
> <th>confiscate</th>
> <th>assignAbleToPerson</th>
> </tr>
> <jx:forEach select="#{????????}">
> <tr>
> <td>${model.goodsMaterialId}</td>
> <td>${model.description}</td>
> <td>${model.amount}</td>
> <td>${model.unit}</td>
> <td>${model.confiscate}</td>
> <td>${model.assignAbleToPerson}</td>
> </tr>
> </jx:forEach>
> -------------------------------------------------------------------
>
> i do not know what to put in the <jx:forEach select="#{????????}">
> to adress the goods elements of the model....
>
> Thanks in davance, thanks a lot indeed!
> phil-
Instead of FormTemplateTransformer use template.jx macro library for CForms.
--
Leszek Gawron lgawron@mobilebox.pl
Project Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65