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

Eelco Hillenius updated WICKET-839:
-----------------------------------

    Summary: Make FormComponent#setRequired non-final  (was: 
FormComponent#checkRequired should implement only the input check)

Changed the header so that it will properly display in the change list.

> 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.

Reply via email to