On Tue, 2003-12-02 at 18:02, Vadim Gritsenko wrote:..
Bruno Dumon wrote:
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.My intuition tells me that a BooleanConvertor should return a Boolean object.
What's the purpose of this, IOW what is affected by this?
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
there?
Ok, step by step. Here is model: <wd:field id="hasSomething"> <wd:datatype base="boolean"> <wd:convertor type="plain"/> </wd:datatype> <wd:selection-list> <wd:item value="true"> <wd:label>Yes</wd:label> </wd:item> <wd:item value="false"> <wd:label>No</wd:label> </wd:item> <wd:item value=""> <wd:label>Dunno</wd:label> </wd:item> </wd:selection-list> </wd:field>
Template: <wt:widget id="hasSomething"> <wi:styling list-type="radio" list-orientation="horizontal"/> </wt:widget>
Binding: <wb:value id="hasSomething" path="something"/>
Bean: void setSomething(Boolean); Boolean getSomething();
It did not work before the patch; convertor was returning Boolean.FALSE when, in fact, the value was NULL.
Vadim
