[ https://issues.apache.org/jira/browse/WICKET-839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reopened WICKET-839: ---------------------------------- i dont like opening up setrequired either. my solution doesnt require any of this, so lets see if we can discuss it some more. i really dont mean to be such a pita - but i do think what i am proposing is better. i moved this discussion to the list cause its hard to quote things here. > 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.