The problem is that this setRequired is only really valid for a try
state checkbox. I agree that required shouldnt mean it has to be true
thats weird in my eyes

On 1/7/08, Kent Tong <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I observed that if "required" is set to true for a Checkbox, Wicket will
> ensure that the Checkbox is checked. If it is cleared by the user, it
> will be treated as an error. See
> https://issues.apache.org/jira/browse/WICKET-1221 and
> https://issues.apache.org/jira/browse/WICKET-1260 for some
> background.
>
> For me, "required" means that a value must be provided. For a
> check box, if it is checked, it has a value of true. if it is unchecked, it
> has a value of false. So it always satisfy "required". Treating "required"
> as "having a value of true" doesn't sound correct to me.
>
> If we consider the error message that should be used, for the case of
> forcing the user to check the box (eg, [x] I have read the agreement),
> it should say "you must check xxx", which is quite different from the
> error message for "required": "you must provide xxx".
>
> For the use case of forcing a checked check box, I think an CheckedValidator
> should be used, which can provide a much better default error message.
>
> Not that it's an important, but just to see what others think.
>
> -----
> --
> Kent Tong
> Wicket tutorials freely available at http://www.agileskills2.org/EWDW
> Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
> --
> View this message in context:
> http://www.nabble.com/%22required%22-for-Checkbox-tp14662131p14662131.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to