Package org.zkoss.clientbind
Class ValidationMessagesMonitor
java.lang.Object
org.zkoss.clientbind.ValidationMessagesMonitor
- All Implemented Interfaces:
Serializable,Iterable<String>,Collection<String>,ValidationMessages
public class ValidationMessagesMonitor
extends Object
implements ValidationMessages, Collection<String>, Serializable
A monitor for
ValidationMessages to send a notification to client.- Author:
- jumperchen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationMessagesMonitor(ClientBindComposer owner, ValidationMessages messages) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends String> c) voidaddMessages(Component component, String s, String s1, String[] strings) add validation messages to componentvoidadd validation messages to componentvoidclear()voidclear all validation messagevoidclear validation message of a special message keyvoidclearKeyMessages(Component component, String s) clear validation message of component and a special message keyvoidclearMessages(Component component) clear validation message of componentvoidclearMessages(Component component, String s) clear validation message of componentbooleanbooleancontainsAll(Collection<?> c) Returns the first associated component from the given key, if any.Returns all associated components from the given key, if any.Returns the first field value from the given key, if any.getFieldValue(Component component, String s) Returns the first field value from the given key and component, if any.Object[]Returns all field values from the given key, if any.Object[]getFieldValues(Component component, String s) Returns all field values from the given key and component, if any.String[]get validation message of a special keyString[]getKeyMessages(Component component, String s) get validation message of component and a special keyString[]get all validation messagesString[]getMessages(Component component) get validation messages of a componentString[]getMessages(Component component, String s) get validation messages of a component and special attributebooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) voidsetMessages(Component component, String s, String s1, String[] strings) set validation messages to component, it will replace previous messagesvoidset validation messages to component, it will replace previous messagesintsize()String[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
ValidationMessagesMonitor
-
-
Method Details
-
clearMessages
Description copied from interface:ValidationMessagesclear validation message of component- Specified by:
clearMessagesin interfaceValidationMessages
-
clearMessages
Description copied from interface:ValidationMessagesclear validation message of component- Specified by:
clearMessagesin interfaceValidationMessages
-
clearKeyMessages
Description copied from interface:ValidationMessagesclear validation message of component and a special message key- Specified by:
clearKeyMessagesin interfaceValidationMessages
-
clearKeyMessages
Description copied from interface:ValidationMessagesclear validation message of a special message key- Specified by:
clearKeyMessagesin interfaceValidationMessages
-
clearAllMessages
public void clearAllMessages()Description copied from interface:ValidationMessagesclear all validation message- Specified by:
clearAllMessagesin interfaceValidationMessages
-
getMessages
Description copied from interface:ValidationMessagesget validation messages of a component and special attribute- Specified by:
getMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message in component and attribute
-
getMessages
Description copied from interface:ValidationMessagesget validation messages of a component- Specified by:
getMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message of component
-
getMessages
Description copied from interface:ValidationMessagesget all validation messages- Specified by:
getMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no messages
-
getKeyMessages
Description copied from interface:ValidationMessagesget validation message of component and a special key- Specified by:
getKeyMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message of key
-
getKeyMessages
Description copied from interface:ValidationMessagesget validation message of a special key- Specified by:
getKeyMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message of key
-
setMessages
Description copied from interface:ValidationMessagesset validation messages to component, it will replace previous messages- Specified by:
setMessagesin interfaceValidationMessages- Parameters:
component- the component refers to the messagess- the attr refers to the messagess1- the custom key refers to this messages, nullablestrings- the messages
-
setMessages
Description copied from interface:ValidationMessagesset validation messages to component, it will replace previous messages- Specified by:
setMessagesin interfaceValidationMessages- Parameters:
component- the component refers to the messagess- the attr refers to the messagess1- the custom key refers to this messages, nullablestrings- the messageso- the rejected value
-
addMessages
Description copied from interface:ValidationMessagesadd validation messages to component- Specified by:
addMessagesin interfaceValidationMessages- Parameters:
component- the component refers to the messagess- the attr refers to the messagess1- the custom key refers to this messages, nullablestrings- the messages
-
addMessages
Description copied from interface:ValidationMessagesadd validation messages to component- Specified by:
addMessagesin interfaceValidationMessages- Parameters:
component- the component refers to the messagess- the attr refers to the messagess1- the custom key refers to this messages, nullablestrings- the messageso- the rejected value
-
getFieldValue
Description copied from interface:ValidationMessagesReturns the first field value from the given key, if any.- Specified by:
getFieldValuein interfaceValidationMessages- Parameters:
s- the custom key refers to this messages, nullable- Returns:
- value. Nullable.
-
getFieldValue
Description copied from interface:ValidationMessagesReturns the first field value from the given key and component, if any.- Specified by:
getFieldValuein interfaceValidationMessages- Parameters:
component- the component refers to the values- the custom key refers to this value, nullable- Returns:
- value. Nullable.
-
getFieldValues
Description copied from interface:ValidationMessagesReturns all field values from the given key, if any.- Specified by:
getFieldValuesin interfaceValidationMessages- Parameters:
s- the custom key refers to this messages, nullable- Returns:
- values. Always not null.
-
getFieldValues
Description copied from interface:ValidationMessagesReturns all field values from the given key and component, if any.- Specified by:
getFieldValuesin interfaceValidationMessages- Parameters:
component- the component refers to the values- the custom key refers to this value, nullable- Returns:
- values. Always not null.
-
getAssociate
Description copied from interface:ValidationMessagesReturns the first associated component from the given key, if any.- Specified by:
getAssociatein interfaceValidationMessages- Parameters:
s- the custom key refers to this messages, nullable- Returns:
- component. Nullable.
-
getAssociates
Description copied from interface:ValidationMessagesReturns all associated components from the given key, if any.- Specified by:
getAssociatesin interfaceValidationMessages- Parameters:
s- the custom key refers to this messages, nullable- Returns:
- components. Always not null.
-
size
public int size()- Specified by:
sizein interfaceCollection<String>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<String>
-
contains
- Specified by:
containsin interfaceCollection<String>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<String>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<String>
-
add
- Specified by:
addin interfaceCollection<String>
-
remove
- Specified by:
removein interfaceCollection<String>
-
containsAll
- Specified by:
containsAllin interfaceCollection<String>
-
addAll
- Specified by:
addAllin interfaceCollection<String>
-
removeAll
- Specified by:
removeAllin interfaceCollection<String>
-
retainAll
- Specified by:
retainAllin interfaceCollection<String>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<String>
-