boolean checkRequired() { return
Boolean.TRUE.equals((Boolean)getModelObject()); }

-igor


On Jan 5, 2008 7:07 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:
> Hi!
>
> In regards to my earlier post concerning this:
>
> http://www.nabble.com/Bug-in-1.3-final%3A-CheckBox.setRequired%28%29-is-not-picked-up-as-error-when-unchecked-to14619181.html
>
> I suddenly got the reverse problem: When I have a checkbox like this:
>
>       CheckBox agree = new CheckBox("agree", new Model()) {
>          @Override public boolean checkRequired() {
>                 return false;
>         }
>       };
>       agree.setRequired(true);
>
> .. I get the error "Field 'agree' is required." even when I check the box. 
> This is driving me crazy :) What am I doing wrong? I could swear
> that it worked earlier :)
>
> Sincerely,
> Edvin Syse
>
> ---------------------------------------------------------------------
> 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