public class ValidationMessages extends UifDictionaryBeanBase
componentCode, namespaceCode
Constructor and Description |
---|
ValidationMessages() |
Modifier and Type | Method and Description |
---|---|
protected void |
addNestedGroupKeys(Collection<String> keyList,
Component component)
Adds all group keys of this component (starting from this component itself) by calling getKeys on each of
its nested group's ValidationMessages and adding them to the list.
|
protected void |
addValidationDataSettingsValue(Map<String,Object> valueMap,
Map<String,String> defaults,
String key,
Object value)
Adds the value passed to the valueMap with the key specified, if the value does not match the
value which already exists in defaults (to avoid having to write out extra data that can later
be derived from the defaults in the js)
|
void |
generateMessages(View view,
Object model,
Component parent)
Generates the messages based on the content in the messageMap
|
List<String> |
getAdditionalKeysToMatch()
AdditionalKeysToMatch is an additional list of keys outside of the
default keys that will be matched when messages are returned after a form
is submitted.
|
List<String> |
getErrors()
The list of error messages found for the keys that were matched on this
ValidationMessages This is generated and cannot be set
|
List<String> |
getInfos()
The list of info messages found for the keys that were matched on this
ValidationMessages This is generated and cannot be set
|
protected List<String> |
getKeys(Component parent)
Gets all the keys associated to this ValidationMessages.
|
protected List<String> |
getMessages(View view,
String key,
List<List<ErrorMessage>> lists)
Gets all the messages from the list of lists passed in (which are
lists of ErrorMessages associated to the key) and uses the configuration
service to get the message String associated.
|
List<String> |
getWarnings()
The list of warning messages found for the keys that were matched on this
ValidationMessages This is generated and cannot be set
|
boolean |
isDisplayMessages()
If true, error, warning, and info messages will be displayed (provided
they are also set to display).
|
void |
setAdditionalKeysToMatch(List<String> additionalKeysToMatch) |
void |
setAdditionalKeysToMatch(String additionalKeysToMatch)
Convenience setter for additional keys to match that takes a string argument and
splits on comma to build the list
|
void |
setDisplayMessages(boolean displayMessages) |
protected void |
setErrors(List<String> errors) |
protected void |
setInfos(List<String> infos) |
protected void |
setWarnings(List<String> warnings) |
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
public ValidationMessages()
public void generateMessages(View view, Object model, Component parent)
view
- the current Viewmodel
- the current modelparent
- the parent of this ValidationMessagesprotected List<String> getMessages(View view, String key, List<List<ErrorMessage>> lists)
view
- key
- lists
- protected List<String> getKeys(Component parent)
protected void addNestedGroupKeys(Collection<String> keyList, Component component)
keyList
- component
- public List<String> getAdditionalKeysToMatch()
public void setAdditionalKeysToMatch(String additionalKeysToMatch)
additionalKeysToMatch
- String to parsepublic void setAdditionalKeysToMatch(List<String> additionalKeysToMatch)
additionalKeysToMatch
- the additionalKeysToMatch to setpublic boolean isDisplayMessages()
If true, error, warning, and info messages will be displayed (provided they are also set to display). Otherwise, no messages for this ValidationMessages container will be displayed (including ones set to display). This is a global display on/off switch for all messages.
Other areas of the screen react to a display flag being turned off at a certain level, if display is off for a field, the next level up will display that fields full message text, and if display is off at a section the next section up will display those messages nested in a sublist.
public void setDisplayMessages(boolean displayMessages)
displayMessages
- the displayMessages to setpublic List<String> getErrors()
protected void setErrors(List<String> errors)
getErrors()
public List<String> getWarnings()
protected void setWarnings(List<String> warnings)
getWarnings()
public List<String> getInfos()
protected void setInfos(List<String> infos)
getInfos()
protected void addValidationDataSettingsValue(Map<String,Object> valueMap, Map<String,String> defaults, String key, Object value)
valueMap
- the data map being constructeddefaults
- defaults for validation messageskey
- the variable name being addedvalue
- the value set on this objectCopyright © 2005–2016 The Kuali Foundation. All rights reserved.