Hi guys,

   According to the wicket javadoc the method checkRequired () of the
FormComponent class "...should typically only be called when
isRequired() returns true."
   But it seems to be different...

        public final void validate()
        {
                validateRequired();  <<<-------------------- here
                if (isValid())
                {
                        convertInput();

                        if (isValid() && isRequired() && getConvertedInput() == 
null &&
isInputNullable())
                        {
                                reportRequiredError();
                        }

                        if (isValid())
                        {
                                validateValidators();
                        }
                }
        }

        protected final void validateRequired()
        {
                if (!checkRequired())   <<<--------------------- and here
                {
                        reportRequiredError();
                }
        }

   As you can see the checkRequired () is called unconditionally.

   Vitaly

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to