Hi guys,

   It seams that there is a bug in the FormComponent code. I try to
override chechRequired method but it seams to not work at all.
   Here is a snippet from the sources. As you can see there is a
second requirement check.

        /**
         * Checks if the raw input value is not null if this component is 
required.
         */
        protected final void validateRequired()
        {
                if (!checkRequired())    <<<<---- the first check
                {
                        reportRequiredError();
                }
        }

        /**
         * Performs full validation of the form component, which consists of
calling validateRequired(),
         * convertInput(), and validateValidators(). This method should only
be used if the form
         * component needs to be fully validated outside the form process.
         */
        public final void validate()
        {
                validateRequired();
                if (isValid())
                {
                        convertInput();

                        if (isValid() && isRequired() &&
getConvertedInput() == null && isInputNullable()) <<<<---- the second
check. Doesn't call the chechRequired ()
                        {
                                reportRequiredError();
                        }

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

   Vitaly

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

Reply via email to