Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3857

Allow validators access to component's model

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4.18, 1.5-RC6
    • None
    • None

    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

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            ivaynberg Igor Vaynberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: