Okay, I thought about a bit more and I now agree with you. It will be a 
mess if you do what I propose in combination with not allowing the empty 
string through validation.

Still, the method CheckBox#clearInput() does not do what you expect. I 
expect it to clear the checkbox. This is translated to setting the model 
to false. Instead it sets the model to null. Does this make more sense?

Regards,
     Erik.


Martijn Dashorst wrote:
> Keep it as current. If you want tri-state logic, then you have to
> implement that. What are you going to do with int, long, double,
> float? make it 0? make it -1?
>
> Defaulting to false is very context dependent, and shouldn't be
> implemented as such.
>
> Martijn
>
> On 1/9/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
>   
>> my checkbox works fine:
>>
>> class MyDataObject
>> {
>>  Boolean myBoolean;
>>
>>  void setMyBoolean(Boolean b)
>>  Boolean getMyBoolean()
>> }
>>
>> so it is not directly the checkbox. But if you map it to a boolean
>> (primitive) then you don't have
>> the three-state thing yes. (null, false, true)
>>
>> So i dont know if this is a bug or not that really needs to be fixed.
>> Because what is the fix?
>>
>> I can't do what you do here. Because if it is a Boolean object then
>> null/empty string is valid.
>>
>> Maybe for booleans we can make an exception that null will be false in the
>> converter
>> What do others think?
>>
>> johan
>>
>>     
>
>   

-- 
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to