org.kuali.rice.krad.uif.element
Class GroupValidationMessages

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.element.ValidationMessages
              extended by org.kuali.rice.krad.uif.element.GroupValidationMessages
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean
Direct Known Subclasses:
PageValidationMessages

public class GroupValidationMessages
extends ValidationMessages

ValidationMessages for logic and options specific to groups.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Constructor Summary
GroupValidationMessages()
           
 
Method Summary
protected  void addValidationMessageDataAttributes(Component parent)
          Adds dataAttributes that are appropriate for group level validationMessages data.
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.
 void generateMessages(View view, Object model, Component parent)
          Generates the messages based on the content in the messageMap
 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.
 boolean isDisplayFieldLabelWithMessages()
          If true, the error messages will display the an InputField's title alongside the error, warning, and info messages related to it.
 boolean isDisplayHeaderMessageSummary()
          If true, the header message summary will display (this is the message count message appended to section headers).
 void setCollapseAdditionalFieldLinkMessages(boolean collapseAdditionalFieldLinkMessages)
          Set collapseAdditionalFieldLinkMessages
 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.
 void setDisplayHeaderMessageSummary(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, setWarnings
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, preventModification, setComponentCode, setNamespaceCode, unwrap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
 

Constructor Detail

GroupValidationMessages

public GroupValidationMessages()
Method Detail

generateMessages

public void generateMessages(View view,
                             Object model,
                             Component parent)
Generates the messages based on the content in the messageMap

Overrides:
generateMessages in class ValidationMessages
Parameters:
view - the current View
model - the current model
parent - the parent of this ValidationMessages

addValidationMessageDataAttributes

protected void addValidationMessageDataAttributes(Component parent)
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 group
sectionIds - list to put section ids into
order - list to put order of ids into (both fields and sections)
skipSections - skip adding sections

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.

Parameters:
displayHeaderMessageSummary -


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.