Don't know about this sample, but it should be similar. Referencing the boolean field as case widget should work IIRC. I have done it myself, I could have a look at latest at monday. The rest should be the same like the selection list sample.
I promised something, but did not make it to send it here. So somewhat late here is my example:
in form definition:
<fd:booleanfield id="newAddressKnown">
<fd:label><i18n:text key="newAddressKnown"/></fd:label>
<fd:on-value-changed>
<javascript>
var widget = event.source;
var stringWidget = event.source.parent.getChild("newAddressKnownString");
stringWidget.value = new java.lang.String(widget.value);
</javascript>
</fd:on-value-changed>
</fd:booleanfield>
<fd:output id="newAddressKnownString">
<fd:datatype base="string"/>
</fd:output>
<fd:union id="newAddress" case="newAddressKnownString">
<fd:widgets>
<fd:struct id="true">
<fd:widgets>
... the optional widgets ...
</fd:widgets>
</fd:struct>
</fd:widgets>
</fd:union>
in form template:
<ft:widget id="newAddressKnown">
<fi:styling submit-on-change="true"/>
</ft:widget>
<ft:union id="newAddress">
<ft:case id="true">
<ft:struct id="true">
... the optional widgets ...
</ft:struct>
</ft:case>
</ft:union>Hope it helps. If someone can integrate it into the Cocoon samples, I would be happy to commit it.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
