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.
So:
<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:form>
<fd:widgets>
<fd:field id="controlling-widget">
<fd:selection-list>
<fd:item value="choice-1" />
<fd:item value="choice-2" />
</fd:selection-list>
</fd:field>
.
.
<fd:union id="my-union">
<fd:widgets>
<fd:group id="choice-1">
<fd:widgets>
.
.
</fd:widgets>
</fd:group>
<fd:group id="choice-2">
<fd:widgets>
.
.
</fd:widgets>
</fd:group>
</fd:widgets>
</fd:union>
</fd:widgets>
</fd:form>
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 :-).
HTH,
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]