+1 for 2nd option -----Original Message----- From: Igor Vaynberg <[email protected]> Date: Tue, 5 Apr 2011 11:46:40 To: <[email protected]> Reply-To: [email protected] Subject: Re: [VOTE] Behavior of CheckBox With Respect to setRequired(true)
+1 for option 2 -igor On Fri, Apr 1, 2011 at 10:34 AM, James Carman <[email protected]> wrote: > This has been discussed before > (https://issues.apache.org/jira/browse/WICKET-1221), but I can't find > the old vote thread to see what folks think. The problem is that a > checkbox is a weird bird when it comes to HTTP. If it's unchecked, it > doesn't send a value which makes Wicket think you haven't provided a > value for that input field. Right now, if you call setRequired(true) > on a CheckBox, it's going to require the user to actually check the > box. What do folks think the desired behavior should be? > > 1. The current approach is correct, requiring a checkbox means > requiring that it be checked. > > 2. A checkbox shouldn't be able to be required. You can't *not* > provide a value (it's binary) for a checkbox, so therefore it always > should satisfy the required requirement. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
