more logical would imo be if the validators could be chained and then
let them deside if they want to do And or Or logic. But i have never
worked with validators before so i am not sure if this already
possible or not.

my 2c

Maurice

On 6/19/07, Jan Vermeulen <[EMAIL PROTECTED]> wrote:

The code below is the actual code of FormComponent:validate()

        public final void validate()
        {
                validateRequired();
                if (isValid())
                {
                        convert();

                        if (isValid()  && getConvertedInput() != null)
                        {
                                validateValidators();
                        }
                }
        }

The code in bold has been added. Problem is that we are using a validator
(that ends up consulting a Hibernate validator annotation) to determine if a
field is required for an entity.

But with the added code, this validator never gets called ! If we already
passed through an isValid(), could you not suppose that the extra check is
not needed ? Or should it not be part of the isValid() logic, in a way that
is overridable (isValid() is final) ?

Jan.
--
View this message in context: 
http://www.nabble.com/Problem-with-latest-changes-in-FormComponent%3Avalidate%28%29-tf3945885.html#a11193140
Sent from the Wicket - Dev mailing list archive at Nabble.com.


Reply via email to