You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Eelco Hillenius (JIRA)" <ji...@apache.org> on 2007/08/13 08:05:43 UTC

[jira] Resolved: (WICKET-839) Make FormComponent#setRequired non-final

     [ https://issues.apache.org/jira/browse/WICKET-839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eelco Hillenius resolved WICKET-839.
------------------------------------

    Resolution: Fixed

> Make FormComponent#setRequired non-final
> ----------------------------------------
>
>                 Key: WICKET-839
>                 URL: https://issues.apache.org/jira/browse/WICKET-839
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>            Reporter: Eelco Hillenius
>            Assignee: Eelco Hillenius
>             Fix For: 1.3.0-beta3
>
>
> Currently, checkRequired starts with calling isRequired(), so that method is actually doing two things where it should do one. The check should be done before the method is called in validateRequired instead
> Currently the multiply example in wicket-examples/forminput would have to have the check implemented like this:
> 	public boolean checkRequired()
> 	{
> 		return isRequired() ? left.setRequired(true).checkRequired() &&
> 				right.setRequired(true).checkRequired() : true;
> 	}
> which is a pretty ugly hack, while after the change, it can be coded like this:
> 	public boolean checkRequired()
> 	{
> 		return left.checkRequired() && right.checkRequired();
> 	}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.