You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2004/12/01 02:49:09 UTC

Re: [Cforms] Correct syntax for binding bean in repeater?

On 30.11.2004 21:57, H.vanderLinden@MI.unimaas.nl wrote:

>>This method adds the new AppointmentBean to the list of 
>>appointments, something like:
>>
>>public void add(AppointmentBean ab) {
>>     this.lists.appointments.add(ab);
>>}
> 
> I know this is how the add method should work then, but the problem is that
> I have a "generic" structure. So what I would need is either:
> 
> public void add(String listname, Bean bean) {
>   this.lists.get(listname).add(bean);
> }
> 
> but I prefer to do the adding directly to the list, so I don't have to
> duplicate the name of the list. I already wrote my own version of
> insert-bean to be able to have my "appointmentbean" created by a
> beanBuilder.

I see. If 'lists' itself is a bean should it not simply work with 
setting context of repeater to lists bean and row-path to appointment list:

<fb:repeater id="appointments" parent-path="lists" row-path="appointments">

Joerg

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