Interface ValidationMessages

All Known Implementing Classes:
ValidationMessagesImpl, ValidationMessagesMonitor

public interface ValidationMessages
To provide the message binding between validator and binder.
Since:
6.0.0
Author:
dennis
  • Method Details

    • clearMessages

      void clearMessages(Component comp, String attr)
      clear validation message of component
    • clearMessages

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

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

      void clearKeyMessages(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

      String[] getMessages(Component comp, 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

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

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

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

      String[] getKeyMessages(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, String attr, String key, 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, String attr, String key, String[] messages, 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, String attr, String key, 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, String attr, String key, String[] messages, 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

      Object getFieldValue(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

      Object getFieldValue(Component comp, 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

      Object[] getFieldValues(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

      Object[] getFieldValues(Component comp, 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(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(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