cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lutz <>
Subject Re: [CForms] SOLVED repeater-actions in union groups do not work
Date Thu, 29 Sep 2005 14:22:59 GMT
Sorry for the noise,
I finally solved it and I think I am starting to get grey hair soon if 
this goes on .-).

I got confused by  the id's... my problem was that I tried to name the 
groups nested in the union in my own way. But, the id of each nested 
group has to be exact the same value as caseWidget for this case.

<snip />

> Joerg says
> <quote>
> While the union
> binding and the union in the template have an explicit case, the form 
> definition
> has not (but obviously an implicit one) and you have to use a 
> container widget
> for it. 

hm, if this means you have to put the rest of your form (the non union 
part) into a group, I did not have to.

> Additionally the container widget must have the id of the caseWidget's
> value, here 'editingInt'. Union processing continues only for its 
> children named
> like the caseWidget's value.

This was the important point. Though you have the value of the 
"controlling" widget in the case tag in binding and template, it has to 
be in the id of the nested  fd:group too !

> </quote>
> Are there some simple examples or explanations out there ?

So it has to be

       <fd:field id="controlling-widget">
             <fd:item value="choice-1" />
             <fd:item value="choice-2" />

       <fd:union id="my-union">
             <fd:group id="choice-1">
             <fd:group id="choice-2">

Template and binding have benn quite easy, following the datasource sample.

Finally the link to TimLarson's wiki entry, if someone (like me :-)) was 
missing docs on the union stuff and for some reason to stupid to google 
it out :-).



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message