[jira] [Resolved] (WICKET-3857) Allow validators access to component's model
[ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martijn Dashorst resolved WICKET-3857. -- Resolution: Fixed Reinstated Validatable in 1.5 > Allow validators access to component's model > > > Key: WICKET-3857 > URL: https://issues.apache.org/jira/browse/WICKET-3857 > Project: Wicket > Issue Type: New Feature >Reporter: Igor Vaynberg >Assignee: Igor Vaynberg > Fix For: 1.5-RC6, 1.4.18 > > > sometimes it is useful for validators to get access to component's model. for > example > a) validators can use the model to get value as it was before editing started > - ie a password validator that forces the user to change their password > b) validators can access some metadata about the model - ie a model that > implements IPropertyReflectionAwareModel > in 1.4 this is done by adding a IModelAwareValidatable#getModel() mixin and > casting IValidatable down to it. in 1.5 #getModel() has been introduced > direction to IValidatable -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3857) Allow validators access to component's model
[ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-3857. --- Resolution: Fixed Validatable was there to facilitate using wicket validators outside of wicket or testing them stand-alone. its a trivial class to implement if you still need it... 1.4->1.5 is a major release. we can break api between major releases, so its not necessary to keep it as deprecated. > Allow validators access to component's model > > > Key: WICKET-3857 > URL: https://issues.apache.org/jira/browse/WICKET-3857 > Project: Wicket > Issue Type: New Feature >Reporter: Igor Vaynberg >Assignee: Igor Vaynberg > Fix For: 1.5-RC6, 1.4.18 > > > sometimes it is useful for validators to get access to component's model. for > example > a) validators can use the model to get value as it was before editing started > - ie a password validator that forces the user to change their password > b) validators can access some metadata about the model - ie a model that > implements IPropertyReflectionAwareModel > in 1.4 this is done by adding a IModelAwareValidatable#getModel() mixin and > casting IValidatable down to it. in 1.5 #getModel() has been introduced > direction to IValidatable -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3857) Allow validators access to component's model
[ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-3857. --- Resolution: Fixed Assignee: Igor Vaynberg > Allow validators access to component's model > > > Key: WICKET-3857 > URL: https://issues.apache.org/jira/browse/WICKET-3857 > Project: Wicket > Issue Type: New Feature >Reporter: Igor Vaynberg >Assignee: Igor Vaynberg > Fix For: 1.4.18, 1.5-RC6 > > > sometimes it is useful for validators to get access to component's model. for > example > a) validators can use the model to get value as it was before editing started > - ie a password validator that forces the user to change their password > b) validators can access some metadata about the model - ie a model that > implements IPropertyReflectionAwareModel > in 1.4 this is done by adding a IModelAwareValidatable#getModel() mixin and > casting IValidatable down to it. in 1.5 #getModel() has been introduced > direction to IValidatable -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira