cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor
Date Tue, 02 Dec 2003 22:04:31 GMT
Bruno Dumon wrote:

>On Tue, 2003-12-02 at 18:02, Vadim Gritsenko wrote:
>>Bruno Dumon wrote:

>>>My intuition tells me that a BooleanConvertor should return a Boolean
>>>What's the purpose of this, IOW what is affected by this? 
>>Commit log says it all: instead of null, JavaBean gets Boolean.FALSE, 
>>which is, as I believe, wrong: you should not bind FALSE instead of null.
>Still trying to understand how you're using it in order to fully
>understand the problem:
>Where exactly are you using the convertor? In the binding definition? If
>the Javabean holds a Boolean property, why do you need the convertor

Ok, step by step. Here is model:
    <wd:field id="hasSomething">
      <wd:datatype base="boolean">
        <wd:convertor type="plain"/>
        <wd:item value="true">
        <wd:item value="false">
        <wd:item value="">

  <wt:widget id="hasSomething">
    <wi:styling list-type="radio" list-orientation="horizontal"/>

    <wb:value id="hasSomething" path="something"/>

    void setSomething(Boolean);
    Boolean getSomething();

It did not work before the patch; convertor was returning Boolean.FALSE 
when, in fact, the value was NULL.


View raw message