webwork2 and unchecked checkboxes…

February 3, 2008 on 4:53 pm | In Technical stuff |

your average Web-MVC framework does many things. It may simplify your life with some basic type-conversion. It may allow you to directly map an object’s method as a Web Action. However, even the best may gloss over an issue… at least for a while. For me that framework is WebWork2, and that issue was unchecked checkboxes.

In accordance with the W3C spec, when a form is submitted, its unchecked checkboxes, and other unsuccessful controls are simply ignored. So, you need some form of trickery to get that false set on your Action. A fairly simple (rubbish) hack for this is to search by name for the desired control in a given request, and set it to false when you can’t find the name/value pair.

Well, thanks to some innovation by Konstantin Pribluda, this horrible (OK, slight nuisance) unchecked checkboxes issue is now a thing of the past. For those of you who can’t wait for release of WebWork-2.2.7, there’s a download just for you (Thanks Toby). Guys, keep up the good work!

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^