You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2011/07/02 00:21:28 UTC

[jira] [Created] (WICKET-3857) Allow validators access to component's model, see IModelAwareValidatable#getModel()

Allow validators access to component's model, see IModelAwareValidatable#getModel()
-----------------------------------------------------------------------------------

                 Key: WICKET-3857
                 URL: https://issues.apache.org/jira/browse/WICKET-3857
             Project: Wicket
          Issue Type: New Feature
            Reporter: 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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (WICKET-3857) Allow validators access to component's model

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088617#comment-13088617 ] 

Martijn Dashorst edited comment on WICKET-3857 at 8/22/11 11:32 AM:
--------------------------------------------------------------------

Removing Validatable from wicket core proper is IMO a mistake: the documentation specifically states that it is a user-space object, there is no issue with having it remain in core (is it obsolete?) and we really should make efforts of *deprecating* classes between major releases before removing them (unless there is no alternative i.e. where the deprecated class would not work).

Unless Igor has specific issue with the class remaining in core, I would like it to be moved back (and am willing to do the work)

      was (Author: dashorst):
    Removing Validatable from wicket core proper is IMO a mistake: the documentation specifically states that it is a user-space object, there is no issue with having it remain in core (is it obsolete?) and we really should make efforts of *deprecating* classes between major releases before removing them (unless there is no alternative i.e. where the deprecated class would not work).

Unless Igor has specific issue with the class remaining in core, I would like it to be moved back.
  
> 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

        

[jira] [Resolved] (WICKET-3857) Allow validators access to component's model

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ 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

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Commented] (WICKET-3857) Allow validators access to component's model

Posted by "Emond Papegaaij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087713#comment-13087713 ] 

Emond Papegaaij commented on WICKET-3857:
-----------------------------------------

With this issue, org.apache.wicket.validation.Validatable has been moved to a test package, making it unavailable in the maven artifacts. Validatable was part of Wicket's public API and not marked as deprecated, therefore I think it should stay available. Also, the implementation in the test packages has a bug in getModel: it always returns null, rather than the model.

> 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

        

[jira] [Commented] (WICKET-3857) Allow validators access to component's model

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088617#comment-13088617 ] 

Martijn Dashorst commented on WICKET-3857:
------------------------------------------

Removing Validatable from wicket core proper is IMO a mistake: the documentation specifically states that it is a user-space object, there is no issue with having it remain in core (is it obsolete?) and we really should make efforts of *deprecating* classes between major releases before removing them (unless there is no alternative i.e. where the deprecated class would not work).

Unless Igor has specific issue with the class remaining in core, I would like it to be moved back.

> 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

        

[jira] [Updated] (WICKET-3857) Allow validators access to component's model

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-3857:
----------------------------------

    Description: 
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

  was:
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 b adding a IModelAwareValidatable#getModel() mixin and casting IValidatable down to it. in 1.5 #getModel() has been introduced direction to IValidatable


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

        

[jira] [Reopened] (WICKET-3857) Allow validators access to component's model

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reopened WICKET-3857:
-------------------------------------


reopening for discussion before releasing RC6

> 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

        

[jira] [Closed] (WICKET-3857) Allow validators access to component's model

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst closed WICKET-3857.
------------------------------------


> 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

        

[jira] [Updated] (WICKET-3857) Allow validators access to component's model

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-3857:
----------------------------------

    Description: 
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 b adding a IModelAwareValidatable#getModel() mixin and casting IValidatable down to it. in 1.5 #getModel() has been introduced direction to IValidatable

  was:
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

        Summary: Allow validators access to component's model  (was: Allow validators access to component's model, see IModelAwareValidatable#getModel())

> 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
>             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 b 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] [Issue Comment Edited] (WICKET-3857) Allow validators access to component's model

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088617#comment-13088617 ] 

Martijn Dashorst edited comment on WICKET-3857 at 8/22/11 11:48 AM:
--------------------------------------------------------------------

Removing Validatable from wicket core proper is IMO a mistake: the documentation specifically states that it is a user-space object, there is no issue with having it remain in core (is it obsolete?) and we really should make efforts of *deprecating* classes between major releases before removing them (unless there is no alternative i.e. where the deprecated class would not work).

And removing it during RC phase is especially annoying as we strive to treat RCs as final releases.

Unless Igor has specific issue with the class remaining in core, I would like it to be moved back (and am willing to do the work)

      was (Author: dashorst):
    Removing Validatable from wicket core proper is IMO a mistake: the documentation specifically states that it is a user-space object, there is no issue with having it remain in core (is it obsolete?) and we really should make efforts of *deprecating* classes between major releases before removing them (unless there is no alternative i.e. where the deprecated class would not work).

Unless Igor has specific issue with the class remaining in core, I would like it to be moved back (and am willing to do the work)
  
> 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

        

[jira] [Resolved] (WICKET-3857) Allow validators access to component's model

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ 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] [Reopened] (WICKET-3857) Allow validators access to component's model

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst reopened WICKET-3857:
--------------------------------------


> 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