Class Violation

  • All Implemented Interfaces:
    Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable

    public final class Violation
    extends Object
    implements org.apache.wicket.model.IDetachable
    Validation constraint violation. Provides the list of ModelPaths that led up to the violation and three parameters that can be used to generate a translated description of the violation. These parameters are a message key, an array of parameters for value substitution in the translation and a resourceBundleClass to specify the location of the resource bundle.
    See Also:
    Serialized Form
    • Constructor Detail

      • Violation

        public Violation​(Set<ModelPath> fieldPaths,
                         org.apache.wicket.model.IModel<String> messageModel)
        Create a new violation with the specified message. The scope of this violation will be ValidationScope.DOCUMENT
        Parameters:
        fieldPaths - list of ModelPaths that led up to the violation
        messageModel - a model of the message to be shown to the user
    • Method Detail

      • getMessage

        public org.apache.wicket.model.IModel<String> getMessage()
      • getDependentPaths

        public Set<ModelPath> getDependentPaths()
      • setFeedbackScope

        public void setFeedbackScope​(FeedbackScope feedbackScope)
      • detach

        public void detach()
        Specified by:
        detach in interface org.apache.wicket.model.IDetachable