struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <>
Subject RE: [OT] FRIDAY: HTML Checkboxes SUCK!!!
Date Mon, 16 Jun 2003 09:40:59 GMT
That Im not sure, as Ive not played with the validator myself. It should be
possible, but you may need to use a String property in your ActionForm as
you now have 3 possible values to populate with...

I actually validate in my actions and use string values on my actionforms
for everything including true/false values. In the case of a checkbox my
reset sets to "false" so my validation code checks to see if the string is
"true" or "false". If I change my ui to submit that field from a select box
and provide a blank option whose value is an empty string my validation code
will pick it up when the user selects it and add an ActionError to the
effect that the field wasnt filled in...

-----Original Message-----
From: Brian McSweeney []
Sent: Monday, 16 June 2003 17:26
To: Struts Users Mailing List;
Subject: Re: [OT] FRIDAY: HTML Checkboxes SUCK!!!

I was just thinking about doing the same because of the many messages
discussing the evils of checkboxes. I would also like to use what you
suggested Andrew --> an empty option that doesn't pass validation.

However, I wonder is it possible to do this type of validation with the


----- Original Message -----
From: "Andrew Hill" <>
To: "Struts Users Mailing List" <>
Sent: Monday, June 16, 2003 4:23 AM
Subject: RE: [OT] FRIDAY: HTML Checkboxes SUCK!!!

> +1
> Im thinking of doing the same.
> Checkboxes are evil.
> Another bonus to using dropdowns instead is that if you really need the
> to think about whether that field should be true or false then you can add
> an extra empty choice that doesnt pass validation. That way they will be
> forced to set a value in that field whereas with a checkbox they can
> forget to tick it and submit a false value by mistake...
> My theory on what the w3c specs guys were thinking tends to involve them
> down the pub having a few too many beers and one of them saying "hey guys!
> Ive got an idea - wouldnt it be funny if we..."
> -----Original Message-----
> From: Viggio, Alex []
> Sent: Saturday, 14 June 2003 04:17
> To: 'Struts Users Mailing List'
> Subject: [OT] FRIDAY: HTML Checkboxes SUCK!!!
> Is it just me?!? ;)
> In our last release, I replaced all of the checkboxes with YES/NO
> (<select> and <options> tags using a Collection for the
> "YES"=true/"NO"=false mapping).
> The users seem to prefer this user interface (no one's complained at
> and I can still tie these to a ActionForm boolean property thanks to
> aforementioned Collection (via <define> tag)! We have a complex,
> multi-part/layer wizard workflow using the nesting tablib extensively so
> code was begging for refactorings. This UI change allowed us to get rid of
> all of the kludgy code to support these retarded HTML checkboxes (cya
> ActionForm reset()).
> What were you thinking W3C spec gurus!
> Apologies if you momma worked on the HTML checkbox spec, but it's Friday
> 13th and I'm flying to a warm, tropical beach tomorrow!!!
> - Alex
> p.s. I'm sure that there is a more elegant solution -- feel free to
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message