cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dev at weitling <d...@weitling.net>
Subject Re: HashMap in repeater binding via javascript
Date Sun, 06 Jan 2008 20:44:19 GMT
Hi Jason,

Dev at weitling wrote:
> I tried your tip as well as that from Grek (thanks, Grek :-)). Till 
> now I manage to get no error message and binding goes through my three 
> test entries as inserting some javascript code proved. But my <body> 
> is completely empty:

Jove, am i dumb... I forgot to enclose the repeater in a 
ft:form-template. Now everything works fine as shown below :-)

> bindings/test.xml:
>    <fb:repeater id="testRepeater" parent-path="." row-path="entrySet(.)">
>        <fb:identity>
>            <fb:value id="keyField" path="key"/>
>        </fb:identity>
>        <fb:on-bind>
>            <fb:value id="valueField" path="value"/>
>        </fb:on-bind>
>    </fb:repeater>
>
> templates/test.xml:
>    <body>
>        <ft:repeater id="testRepeater">
>            <table>
>                <ft:repeater-rows>
>                    <tr>
>                        <td>
>                            <ft:widget id="keyField"/>
>                        </td>
>                        <td>
>                            <ft:widget id="valueField"/>
>                        </td>
>                    </tr>
>                </ft:repeater-rows>
>            </table>
>        </ft:repeater>
>    </body>
>
>
> the flow:
>    var form = new Form("definitions/test.xml");
>    form.createBinding("bindings/test.xml");
>    var bean = new Packages.java.util.HashMap();
>    bean.put("de","deutsch");
>    bean.put("fr","francais");
>    bean.put("en","english");
>    form.load(bean);
>    form.showForm("templates/test.xml");

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message