Interface ValidationMessages

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addMessages​(Component comp, java.lang.String attr, java.lang.String key, java.lang.String[] messages)
      add validation messages to component
      void addMessages​(Component comp, java.lang.String attr, java.lang.String key, java.lang.String[] messages, java.lang.Object value)
      add validation messages to component
      void clearAllMessages()
      clear all validation message
      void clearKeyMessages​(java.lang.String key)
      clear validation message of a special message key
      void clearKeyMessages​(Component comp, java.lang.String key)
      clear validation message of component and a special message key
      void clearMessages​(Component comp)
      clear validation message of component
      void clearMessages​(Component comp, java.lang.String attr)
      clear validation message of component
      Component getAssociate​(java.lang.String key)
      Returns the first associated component from the given key, if any.
      Component[] getAssociates​(java.lang.String key)
      Returns all associated components from the given key, if any.
      java.lang.Object getFieldValue​(java.lang.String key)
      Returns the first field value from the given key, if any.
      java.lang.Object getFieldValue​(Component comp, java.lang.String key)
      Returns the first field value from the given key and component, if any.
      java.lang.Object[] getFieldValues​(java.lang.String key)
      Returns all field values from the given key, if any.
      java.lang.Object[] getFieldValues​(Component comp, java.lang.String key)
      Returns all field values from the given key and component, if any.
      java.lang.String[] getKeyMessages​(java.lang.String key)
      get validation message of a special key
      java.lang.String[] getKeyMessages​(Component comp, java.lang.String key)
      get validation message of component and a special key
      java.lang.String[] getMessages()
      get all validation messages
      java.lang.String[] getMessages​(Component comp)
      get validation messages of a component
      java.lang.String[] getMessages​(Component comp, java.lang.String attr)
      get validation messages of a component and special attribute
      void setMessages​(Component comp, java.lang.String attr, java.lang.String key, java.lang.String[] messages)
      set validation messages to component, it will replace previous messages
      void setMessages​(Component comp, java.lang.String attr, java.lang.String key, java.lang.String[] messages, java.lang.Object value)
      set validation messages to component, it will replace previous messages
    • Method Detail

      • clearMessages

        void clearMessages​(Component comp,
                           java.lang.String attr)
        clear validation message of component
      • clearMessages

        void clearMessages​(Component comp)
        clear validation message of component
      • clearKeyMessages

        void clearKeyMessages​(Component comp,
                              java.lang.String key)
        clear validation message of component and a special message key
        Since:
        6.5.2
      • clearKeyMessages

        void clearKeyMessages​(java.lang.String key)
        clear validation message of a special message key
        Since:
        6.5.2
      • clearAllMessages

        void clearAllMessages()
        clear all validation message
        Since:
        6.5.2
      • getMessages

        java.lang.String[] getMessages​(Component comp,
                                       java.lang.String attr)
        get validation messages of a component and special attribute
        Returns:
        messages. Always not null. Empty if no message in component and attribute
      • getMessages

        java.lang.String[] getMessages​(Component comp)
        get validation messages of a component
        Returns:
        messages. Always not null. Empty if no message of component
      • getMessages

        java.lang.String[] getMessages()
        get all validation messages
        Returns:
        messages. Always not null. Empty if no messages
        Since:
        6.0.1
      • getKeyMessages

        java.lang.String[] getKeyMessages​(Component comp,
                                          java.lang.String key)
        get validation message of component and a special key
        Returns:
        messages. Always not null. Empty if no message of key
      • getKeyMessages

        java.lang.String[] getKeyMessages​(java.lang.String key)
        get validation message of a special key
        Returns:
        messages. Always not null. Empty if no message of key
      • setMessages

        void setMessages​(Component comp,
                         java.lang.String attr,
                         java.lang.String key,
                         java.lang.String[] messages)
        set validation messages to component, it will replace previous messages
        Parameters:
        comp - the component refers to the messages
        attr - the attr refers to the messages
        key - the custom key refers to this messages, nullable
        messages - the messages
      • setMessages

        void setMessages​(Component comp,
                         java.lang.String attr,
                         java.lang.String key,
                         java.lang.String[] messages,
                         java.lang.Object value)
        set validation messages to component, it will replace previous messages
        Parameters:
        comp - the component refers to the messages
        attr - the attr refers to the messages
        key - the custom key refers to this messages, nullable
        messages - the messages
        value - the rejected value
        Since:
        8.0.1
      • addMessages

        void addMessages​(Component comp,
                         java.lang.String attr,
                         java.lang.String key,
                         java.lang.String[] messages)
        add validation messages to component
        Parameters:
        comp - the component refers to the messages
        attr - the attr refers to the messages
        key - the custom key refers to this messages, nullable
        messages - the messages
      • addMessages

        void addMessages​(Component comp,
                         java.lang.String attr,
                         java.lang.String key,
                         java.lang.String[] messages,
                         java.lang.Object value)
        add validation messages to component
        Parameters:
        comp - the component refers to the messages
        attr - the attr refers to the messages
        key - the custom key refers to this messages, nullable
        messages - the messages
        value - the rejected value
        Since:
        8.0.1
      • getFieldValue

        java.lang.Object getFieldValue​(java.lang.String key)
        Returns the first field value from the given key, if any.
        Parameters:
        key - the custom key refers to this messages, nullable
        Returns:
        value. Nullable.
        Since:
        8.0.1
      • getFieldValue

        java.lang.Object getFieldValue​(Component comp,
                                       java.lang.String key)
        Returns the first field value from the given key and component, if any.
        Parameters:
        comp - the component refers to the value
        key - the custom key refers to this value, nullable
        Returns:
        value. Nullable.
        Since:
        8.0.1
      • getFieldValues

        java.lang.Object[] getFieldValues​(java.lang.String key)
        Returns all field values from the given key, if any.
        Parameters:
        key - the custom key refers to this messages, nullable
        Returns:
        values. Always not null.
        Since:
        8.0.1
      • getFieldValues

        java.lang.Object[] getFieldValues​(Component comp,
                                          java.lang.String key)
        Returns all field values from the given key and component, if any.
        Parameters:
        comp - the component refers to the value
        key - the custom key refers to this value, nullable
        Returns:
        values. Always not null.
        Since:
        8.0.1
      • getAssociate

        Component getAssociate​(java.lang.String key)
        Returns the first associated component from the given key, if any.
        Parameters:
        key - the custom key refers to this messages, nullable
        Returns:
        component. Nullable.
        Since:
        8.0.1
      • getAssociates

        Component[] getAssociates​(java.lang.String key)
        Returns all associated components from the given key, if any.
        Parameters:
        key - the custom key refers to this messages, nullable
        Returns:
        components. Always not null.
        Since:
        8.0.1