cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: [CForms] booleanfield, on-value-change => display form fields
Date Tue, 07 Dec 2004 19:36:51 GMT
>> 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>
       var widget = event.source;
       var stringWidget = 
       stringWidget.value = new java.lang.String(widget.value);
<fd:output id="newAddressKnownString">
   <fd:datatype base="string"/>
<fd:union id="newAddress" case="newAddressKnownString">
     <fd:struct id="true">
         ... the optional widgets ...

in form template:

<ft:widget id="newAddressKnown">
   <fi:styling submit-on-change="true"/>
<ft:union id="newAddress">
   <ft:case id="true">
     <ft:struct id="true">
       ... the optional widgets ...

Hope it helps. If someone can integrate it into the Cocoon samples, I 
would be happy to commit it.


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

View raw message