cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: CForm model to POJO with a "natural" binding [RE: was Display a CForm Repeater in JXTemplate]
Date Wed, 18 May 2005 08:07:59 GMT
Nicolas Maisonneuve wrote:

>ok maybe i'm not very clear:
>the binding framework is good but useless for simple/natural binding.
>Exemple of a form:
><field name="title"/>
><booleanfield name"field"/>
><repeater name="contacts">
>  <field name="name" />
>a useful tool/feature would be:
>var my bean = form.modelToPojo() 
>the bean will have this structure 
>and form.pojoTomodel(bean)
>It's possible to do this ? if yes how do you this ?

Two solutions come to mind:
- a new <fb:bean> binding, that would bind a full widget subtree to a POJO.
- a new form.createBeanBinding() that would essentially do the same as a 
binding file with a single <fb:bean> instructions, thus avoiding to 
write a seperate file when there's only a bean to bind.


Sylvain Wallez                        Anyware Technologies  
Apache Software Foundation Member     Research & Technology Director

View raw message