You can always create a custom binding where you can map your own values to a boolean value and back.
Look at the docs: http://cocoon.apache.org/2.1/userdocs/forms/binding.html#fb%3Ajavascript


guess you need something like:

<fb:javascript id="foo" path="@foo">
 <fb:load-form>
        if (jxpathPointer.getValue() == 1)
        widget.setValue(new java.lang.Boolean(true));
        else
        widget.setValue(new java.lang.Boolean(false));
 </fb:load-form>
 <fb:save-form>
        if (widget.getValue() == true)
            jxpathPointer.setValue(1);
        else
            jxpathPointer.setValue(0);
 </fb:save-form>
</fb:javascript>


Note that this may contain errors, did no test for this.

Kind Regards,
Jan

[EMAIL PROTECTED] wrote:

Hi,

I'm currently developing my first cocoon form. I experienced that boolean
widgets don't accept int fields as input (when setting the value with a
binding).

Maybe it's a good idea to make boolean widgets also accept int fields as
input? (with value 0 as false, and value 1 as tru)

Regards,

Kees van dieren



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to