Package org.zkoss.bind.sys
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 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 componentvoid
addMessages(Component comp, java.lang.String attr, java.lang.String key, java.lang.String[] messages, java.lang.Object value)
add validation messages to componentvoid
clearAllMessages()
clear all validation messagevoid
clearKeyMessages(java.lang.String key)
clear validation message of a special message keyvoid
clearKeyMessages(Component comp, java.lang.String key)
clear validation message of component and a special message keyvoid
clearMessages(Component comp)
clear validation message of componentvoid
clearMessages(Component comp, java.lang.String attr)
clear validation message of componentComponent
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 keyjava.lang.String[]
getKeyMessages(Component comp, java.lang.String key)
get validation message of component and a special keyjava.lang.String[]
getMessages()
get all validation messagesjava.lang.String[]
getMessages(Component comp)
get validation messages of a componentjava.lang.String[]
getMessages(Component comp, java.lang.String attr)
get validation messages of a component and special attributevoid
setMessages(Component comp, java.lang.String attr, java.lang.String key, java.lang.String[] messages)
set validation messages to component, it will replace previous messagesvoid
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 messagesattr
- the attr refers to the messageskey
- the custom key refers to this messages, nullablemessages
- 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 messagesattr
- the attr refers to the messageskey
- the custom key refers to this messages, nullablemessages
- the messagesvalue
- 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 messagesattr
- the attr refers to the messageskey
- the custom key refers to this messages, nullablemessages
- 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 messagesattr
- the attr refers to the messageskey
- the custom key refers to this messages, nullablemessages
- the messagesvalue
- 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 valuekey
- 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 valuekey
- 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
-
-