Actually I've had a discussion about default/NULL values for primitive & Object types in Java http://www.theserverside.com/discussions/thread.tss?thread_id=30463 I still do not see a clean solution for this... primitive types are pain... l8r, Ruslan ________________________________
From: [EMAIL PROTECTED] on behalf of Tim Fennell Sent: Thu 4/10/2008 11:20 AM To: Stripes Users List Subject: Re: [Stripes-users] property bindings en checkboxes There isn't really a way to stop this. But you raise an interesting point, for almost all types there is a sensible default value - and Stripes uses that where appropriate. E.g. for ints it will set 0, and for boolean it will set false. The problem is with Booleans that you can make the argument that null is the default value (in fact, according Java it is, because Boolean is a reference type), but you could also make the argument that logically Boolean.FALSE is an appropriate default... Just out of interest, if these are non-nullable values, is there a reason you're using Booleans instead of booleans? -t On Apr 10, 2008, at 10:39 AM, marijan milicevic wrote: > Hi there, > > it seams like stripes is binding null values to all unchecked > chekboxes, > is there a way to prevent this? > (my domain object has some Boolean fiedls with default values set to > Boolean.FALSE/false) and nullable=false annotation.. > thx > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http:// > java.sun.com/javaone > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users *************************************************************************************************** The information in this email is confidential and may be legally privileged. Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system. ***************************************************************************************************
<<winmail.dat>>
------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
