By "nature of checkbox" you mean nature of HTTP. As setRequired is Wicket
API,  IMO it should abstract the empty info about false input from framework
users, in benefit of those who are deliberately sending a 'false' value in
their form input.

On Sat, Apr 2, 2011 at 12:30 PM, Bruno Borges <bruno.bor...@gmail.com>wrote:

> No problem. :-)
>
> setRequired means what you said: "please, provide a value".
>
> In case of a Checkbox, if setRequired is false, it means: "you don't have
> to
> provide a value" which in other words means "you have the choice to do
> nothing about it" which in other words means "you don't have to check it".
> Which by the nature of a checkbox, means 'false'. Now, if setRequired true,
> then it means "you have to provide a value" which means "you don't have the
> choice to ignore it" wich means "you must check it", which by the nature of
> the checkbox, means 'true'.
>
> Now, if setRequired of checkboxes happens to do nothing (at the worse
> throws
> an UnsupportedException; but I think setRequired is final), then it would
> break *a lot* of things. Even if you state that this change is only 1.5 and
> people should migrate... that is complicate.
>
> I'm deploying Wicket for a huge healthcare/life/auto ensurance company in
> Brazil, and I'm sure they won't like the idea of having to migrate 300 apps
> to 1.5, with this kind of API change. Until now, most of the changes can be
> fixed (from 1.4 to 1.5) in a higher level, not having to look at every and
> single Form. With this, it would be a nightmare.
>
> just my 2 cents
>
>
> Bruno Borges
> www.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
>  - Francois de La Rochefoucauld
>
>
>
> On Sat, Apr 2, 2011 at 5:47 AM, Maarten Billemont <lhun...@gmail.com>
> wrote:
>
> >
> > On 02 Apr 2011, at 01:01, Maarten Billemont wrote:
> >
> > >
> > > On 02 Apr 2011, at 00:13, Bruno Borges wrote:
> > >
> > >> [    ] Please, check this box if you agree with EULA
> > >> [ x ] Please, uncheck this box if you don't want to receive
> > notifications
> > >>
> > >>
> > >> In this case, I would set the first checkbox as required, and leave
> the
> > >> later as optional.
> > >>
> > >> Vote for (1) +1
> > >
> > > Please don't pretend a checkbox is a Radio component.  This is
> irrelevant
> > to this discussion.
> >
> > I totally missed that you have two different questions here, apologies.
> >
> > Nevertheless, you're disregarding my earlier statements.  You're asking
> us
> > to make "setRequired" do something that's completely different from what
> > it's supposed to do.  If you require a certain value, that's what
> validators
> > are for.  If you require a value to be given, you use setRequired.
> >  Checkboxes ALWAYS give a value.  There is no "I choose not to choose"
> > option with a checkbox.  That is what setRequired is for.  It forces you
> to
> > make a *choice*.  It does not force you to make a specific choice.
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
Pedro Henrique Oliveira dos Santos

Reply via email to