Package org.zkoss.bind.sys
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 TypeMethodDescriptionvoidaddMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages) add validation messages to componentvoidaddMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value) add validation messages to componentvoidclear all validation messagevoidclearKeyMessages(String key) clear validation message of a special message keyvoidclearKeyMessages(org.zkoss.zk.ui.Component comp, String key) clear validation message of component and a special message keyvoidclearMessages(org.zkoss.zk.ui.Component comp) clear validation message of componentvoidclearMessages(org.zkoss.zk.ui.Component comp, String attr) clear validation message of componentorg.zkoss.zk.ui.ComponentgetAssociate(String key) Returns the first associated component from the given key, if any.org.zkoss.zk.ui.Component[]getAssociates(String key) Returns all associated components from the given key, if any.getFieldValue(String key) 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.Object[]getFieldValues(String key) Returns all field values from the given key, if any.Object[]getFieldValues(org.zkoss.zk.ui.Component comp, String key) Returns all field values from the given key and component, if any.String[]getKeyMessages(String key) get validation message of a special keyString[]getKeyMessages(org.zkoss.zk.ui.Component comp, String key) get validation message of component and a special keyString[]get all validation messagesString[]getMessages(org.zkoss.zk.ui.Component comp) get validation messages of a componentString[]getMessages(org.zkoss.zk.ui.Component comp, String attr) get validation messages of a component and special attributevoidsetMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages) set validation messages to component, it will replace previous messagesvoidsetMessages(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
clear validation message of component -
clearMessages
void clearMessages(org.zkoss.zk.ui.Component comp) clear validation message of component -
clearKeyMessages
clear validation message of component and a special message key- Since:
- 6.5.2
-
clearKeyMessages
clear validation message of a special message key- Since:
- 6.5.2
-
clearAllMessages
void clearAllMessages()clear all validation message- Since:
- 6.5.2
-
getMessages
get validation messages of a component and special attribute- Returns:
- messages. Always not null. Empty if no message in component and attribute
-
getMessages
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
get validation message of component and a special key- Returns:
- messages. Always not null. Empty if no message of key
-
getKeyMessages
get validation message of a special key- Returns:
- messages. Always not null. Empty if no message of key
-
setMessages
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(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 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
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(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 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
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
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
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
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
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
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
-