Package org.kuali.rice.krad.uif.element
Class GroupValidationMessages
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
org.kuali.rice.krad.uif.element.ValidationMessages
org.kuali.rice.krad.uif.element.GroupValidationMessages
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean
- Direct Known Subclasses:
PageValidationMessages
ValidationMessages for logic and options specific to groups.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds dataAttributes that are appropriate for group level validationMessages data.protected voidcollectIdsFromItems(List<? extends Component> items, List<String> sectionIds, List<String> order, boolean skipSections) Collects all the ids from the items passed into this method.voidgenerateMessages(View view, Object model, Component parent) Generates the messages based on the content in the messageMapbooleanIf true, validation message divs are closeable(dismissable) by the user and they do not return until another page level validation/component refresh/page refresh is invokedbooleanWhen collapseAdditionalFieldLinkMessages is set to true, the messages generated on field links will be summarized to limit the space they take up with an appendage similar to [+n message type] appended for additional messages that are omitted.booleanIf true, the error messages will display the an InputField's title alongside the error, warning, and info messages related to it.booleanIf true, the header message summary will display (this is the message count message appended to section headers).voidsetCloseable(boolean closeable) voidsetCollapseAdditionalFieldLinkMessages(boolean collapseAdditionalFieldLinkMessages) Set collapseAdditionalFieldLinkMessagesvoidsetDisplayFieldLabelWithMessages(boolean displayFieldLabelWithMessages) If true, the error messages will display the an InputField's title alongside the error, warning, and info messages related to it.voidsetDisplayHeaderMessageSummary(boolean displayHeaderMessageSummary) Sets whether the header message summary will display or not for this section/page.Methods inherited from class org.kuali.rice.krad.uif.element.ValidationMessages
addNestedGroupKeys, addValidationDataSettingsValue, getAdditionalKeysToMatch, getErrors, getInfos, getKeys, getMessages, getWarnings, isDisplayMessages, setAdditionalKeysToMatch, setAdditionalKeysToMatch, setDisplayMessages, setErrors, setInfos, setWarningsMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
-
Constructor Details
-
GroupValidationMessages
public GroupValidationMessages()
-
-
Method Details
-
generateMessages
Generates the messages based on the content in the messageMap- Overrides:
generateMessagesin classValidationMessages- Parameters:
view- the current Viewmodel- the current modelparent- the parent of this ValidationMessages
-
addValidationMessageDataAttributes
Adds dataAttributes that are appropriate for group level validationMessages data.This data is used by the validation framework clientside. Some special handling at this level includes retrieving the groups and fields generated by different collection layouts and handling page and fieldGroup scenarios slightly differently due to the nature of how they are built out in the js.
- Parameters:
parent- component that is the parent of the validation messages
-
collectIdsFromItems
protected void collectIdsFromItems(List<? extends Component> items, List<String> sectionIds, List<String> order, boolean skipSections) Collects all the ids from the items passed into this method.Puts the ids of items determined to be sections into the sectionIds list, and orders all items by the order they appear on the page in the order list with special identifiers to determine the type of item they are (used by the client js). When skipSections is true do not include sectionIds found in the lists.
- Parameters:
items- items of the groupsectionIds- list to put section ids intoorder- list to put order of ids into (both fields and sections)skipSections- skip adding sections
-
isCloseable
public boolean isCloseable()If true, validation message divs are closeable(dismissable) by the user and they do not return until another page level validation/component refresh/page refresh is invoked- Returns:
- true
-
setCloseable
public void setCloseable(boolean closeable) - See Also:
-
isDisplayFieldLabelWithMessages
public boolean isDisplayFieldLabelWithMessages()If true, the error messages will display the an InputField's title alongside the error, warning, and info messages related to it. This setting has no effect on messages which do not relate directly to a single InputField.- Returns:
- the displayFieldLabelWithMessages
-
setDisplayFieldLabelWithMessages
public void setDisplayFieldLabelWithMessages(boolean displayFieldLabelWithMessages) If true, the error messages will display the an InputField's title alongside the error, warning, and info messages related to it. This setting has no effect on messages which do not relate directly to a single InputField.- Parameters:
displayFieldLabelWithMessages- the displayFieldLabelWithMessages to set
-
isCollapseAdditionalFieldLinkMessages
public boolean isCollapseAdditionalFieldLinkMessages()When collapseAdditionalFieldLinkMessages is set to true, the messages generated on field links will be summarized to limit the space they take up with an appendage similar to [+n message type] appended for additional messages that are omitted. When this flag is false, all messages will be part of the link separated by a comma.- Returns:
- if field link messages are being collapsed
-
setCollapseAdditionalFieldLinkMessages
public void setCollapseAdditionalFieldLinkMessages(boolean collapseAdditionalFieldLinkMessages) Set collapseAdditionalFieldLinkMessages- Parameters:
collapseAdditionalFieldLinkMessages- - true if field link messages are being collapsed
-
isDisplayHeaderMessageSummary
public boolean isDisplayHeaderMessageSummary()If true, the header message summary will display (this is the message count message appended to section headers).- Returns:
- true if the summary will display, false otherwise
-
setDisplayHeaderMessageSummary
public void setDisplayHeaderMessageSummary(boolean displayHeaderMessageSummary) Sets whether the header message summary will display or not for this section/page.
-