Hi Tim,
well, no real reason except I am working agains an API
(which we are in control of, btw, so it can be changed).
Checkboxes have always been p.i.t.a (browser not submitting unchecked
values,
as I remember Spring is doing some funny replicating with hidden values).
It would be nice to override this somehow...
<background story:>
Anyway, this is the first project we are doing with Stripes
(glassfish/EJB3 combo),
beeing my decision (as only one of our devs on this project, I played
with Stripes in my free time) this "checkbox" thingie was bit of a
bummer. (I expected Stripes to bind to default value here).
So far this is only un-elegant solution we had to implement :
@After method binding method that sets notnulls to false..
(e.g. we have a lot fun with TypeConverters, easy parm/form bindings,
security,
friendly urls(thanks Ben!))
Lerning curve was like 2+ hours and I am happy we dropped Spring MVC
which was,
originally planned as MVC..
One more OT:
any "stripers" going to JavaOne next month in SF?
-m
marijan milicevic / software engineering
| || ||| || info.nl, amsterdam
Sint Antoniesbreestraat 16
1011 HB Amsterdam
+31 (0) 20 530 9100 /T
Tim Fennell wrote:
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
-------------------------------------------------------------------------
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