It is a JX template. It contains various macro's, that you can call from your JX template. See it like a set of procedures that, in this case, help you with transforming a CForm into HTML.
The file is placed inside the cforms jar, so it is available on your classpath. That means that you can load it with: <jx:import uri="resource:org/apache/cocoon/forms/generation/template.jx"/> (I'm not sure if you'll need a '/' between resource: and 'org...', but try it...) Then you can call the macro's. Look in the file to see how and what they work, I'm not familiar with those. Bart. > -----Original Message----- > From: Philipp Rech [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 11, 2004 6:41 PM > To: [EMAIL PROTECTED] > Subject: Re: JX-Template with repeater data... how to? > > >>> 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 [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
