Interface ValidationMessages

All Known Implementing Classes:
ValidationMessagesImpl

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

    Modifier and Type
    Method
    Description
    void
    addMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages)
    add validation messages to component
    void
    addMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value)
    add validation messages to component
    void
    clear all validation message
    void
    clear validation message of a special message key
    void
    clearKeyMessages(org.zkoss.zk.ui.Component comp, String key)
    clear validation message of component and a special message key
    void
    clearMessages(org.zkoss.zk.ui.Component comp)
    clear validation message of component
    void
    clearMessages(org.zkoss.zk.ui.Component comp, String attr)
    clear validation message of component
    org.zkoss.zk.ui.Component
    Returns the first associated component from the given key, if any.
    org.zkoss.zk.ui.Component[]
    Returns all associated components from the given key, if any.
    Returns the first field value from the given key, if any.
    getFieldValue(org.zkoss.zk.ui.Component comp, String key)
    Returns the first field value from the given key and component, if any.
    Returns all field values from the given key, if any.
    getFieldValues(org.zkoss.zk.ui.Component comp, String key)
    Returns all field values from the given key and component, if any.
    get validation message of a special key
    getKeyMessages(org.zkoss.zk.ui.Component comp, String key)
    get validation message of component and a special key
    get all validation messages
    getMessages(org.zkoss.zk.ui.Component comp)
    get validation messages of a component
    getMessages(org.zkoss.zk.ui.Component comp, String attr)
    get validation messages of a component and special attribute
    void
    setMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages)
    set validation messages to component, it will replace previous messages
    void
    setMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value)
    set validation messages to component, it will replace previous messages
  • Method Details

    • clearMessages

      void clearMessages(org.zkoss.zk.ui.Component comp, String attr)
      clear validation message of component
    • clearMessages

      void clearMessages(org.zkoss.zk.ui.Component comp)
      clear validation message of component
    • clearKeyMessages

      void clearKeyMessages(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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(org.zkoss.zk.ui.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

      org.zkoss.zk.ui.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

      org.zkoss.zk.ui.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