|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.DictionaryBeanBase org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase org.kuali.rice.krad.uif.component.ComponentBase org.kuali.rice.krad.uif.element.ContentElementBase org.kuali.rice.krad.uif.element.ValidationMessages
public class ValidationMessages
Field that displays error, warning, and info messages for the keys that are matched. By default, an ValidationMessages will match on id and bindingPath (if this ValidationMessages is for an InputField), but can be set to match on additionalKeys and nested components keys (of the its parentComponent). In addition, there are a variety of options which can be toggled to effect the display of these messages during both client and server side validation display. See documentation on each get method for more details on the effect of each option.
Field Summary |
---|
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered |
---|
INITIAL_ORDER_VALUE |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
ValidationMessages()
|
Method Summary | ||
---|---|---|
protected void |
addValidationDataSettingsValue(Map<String,Object> valueMap,
Map<String,String> defaults,
String key,
Object value)
|
|
protected
|
copyProperties(T component)
Copies the properties over for the copy method |
|
void |
generateMessages(boolean reset,
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. |
|
Map<String,String> |
getValidationDataDefaults()
|
|
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 |
performFinalize(View view,
Object model,
Component parent)
PerformFinalize will generate the messages and counts used by the errorsField based on the keys that were matched from the MessageMap for this ValidationMessages. |
|
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)
Sets errors |
|
protected void |
setInfos(List<String> infos)
Sets infos |
|
void |
setValidationDataDefaults(Map<String,String> validationDataDefaults)
|
|
protected void |
setWarnings(List<String> warnings)
Sets warnings |
Methods inherited from class org.kuali.rice.krad.uif.element.ContentElementBase |
---|
getComponentTypeName |
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
---|
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean |
---|
getComponentCode, getNamespaceCode |
Constructor Detail |
---|
public ValidationMessages()
Method Detail |
---|
public void performFinalize(View view, Object model, Component parent)
performFinalize
in interface Component
performFinalize
in class ComponentBase
view
- - view instance that should be finalized for renderingmodel
- - top level object containing the dataparent
- - parent componentFieldBase.performFinalize(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
public void generateMessages(boolean reset, View view, Object model, Component parent)
reset
- true to reset the errors, warnings, and info listsview
- the current Viewmodel
- the current modelparent
- the parent of this ValidationMessagesprotected List<String> getKeys(Component parent)
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()
public List<String> getWarnings()
public List<String> getInfos()
public Map<String,String> getValidationDataDefaults()
public void setValidationDataDefaults(Map<String,String> validationDataDefaults)
protected void addValidationDataSettingsValue(Map<String,Object> valueMap, Map<String,String> defaults, String key, Object value)
protected void setErrors(List<String> errors)
errors
- protected void setWarnings(List<String> warnings)
warnings
- protected void setInfos(List<String> infos)
infos
- protected <T> void copyProperties(T component)
ComponentBase
copyProperties
in class ComponentBase
component
- base beanComponentBase.copy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |