Class 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:
  • Constructor Details

    • GroupValidationMessages

      public GroupValidationMessages()
  • Method Details

    • 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
    • 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.