the added code is there to guard validators against having to check for
null. if we remove it then the first thing all validators should do is check
if validatable.getvalue() is null - which gets annoying and causes NPEs if
you forget.
wicket has a facility for setting whether or not the component is required,
so that should be used.
-igor
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.