and did you look at checkRequired?
public boolean checkRequired()
{
if (isRequired())
{
On Wed, Mar 19, 2008 at 2:24 PM, Vitaly Tsaplin <[EMAIL PROTECTED]>
wrote:
> 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]
>
>