You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ben Pope <be...@gmail.com> on 2005/07/02 13:02:57 UTC
Re: Forms problem: repeater and adding rows
Joose Vettenranta wrote:
> Hi,
>
> in binding file when using beans adding is bind like this:
>
> <fb:on-insert-row>
> <fb:insert-bean classname="my.nice.Item" addmethod="addItem"/>
> </fb:on-insert-row>
>
> but can that be written in javascript for flow or should I just modify
> the bean to setup files correctly on addItem command? Like:
> <fb:on-insert-row>
> <javascript>
> var bean = new Bean();
> bean.setValue("foo");
> return bean;
> </javascript>
> </fb:on-insert-row>
>
> and then when adding new row value would always be "foo".
>
> Basic problem is this: I need to setup default values for the item.
How default are they? Can you not do it in the constructor of the bean?
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org