Class PageValidationMessages

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, LifecycleEventListener

public class PageValidationMessages extends GroupValidationMessages implements LifecycleEventListener
ValidationMessages for logic and options specific to pages.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • PageValidationMessages

      public PageValidationMessages()
  • 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 GroupValidationMessages
      Parameters:
      view - the current View
      model - the current model
      parent - the parent of this ValidationMessages
    • addValidationMessageDataAttributes

      protected void addValidationMessageDataAttributes(Component parent)
      Overridding to prevent the initial writing of data attributes until the view has been processed and we collection unmatched messages (through the lifecycle event). 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.

      Overrides:
      addValidationMessageDataAttributes in class GroupValidationMessages
      Parameters:
      parent - component that is the parent of the validation messages
    • processEvent

      public void processEvent(ViewLifecycle.LifecycleEvent lifecycleEvent, View view, Object model, LifecycleElement eventElement)
      Check for message keys that are not matched anywhere on the page, these unmatched messages must still be displayed at the page level. Invoked on a component listener when an event occurs for the given event component.
      Specified by:
      processEvent in interface LifecycleEventListener
      Parameters:
      lifecycleEvent - event that occurred
      view - view instance the lifecycle is being processed for
      model - object containing the model data
      eventElement - element instance the event occurred on/for
    • isShowPageSummaryHeader

      public boolean isShowPageSummaryHeader()
      If true, shows the page summary header (message count header message in the message block). Otherwise, this header is not rendered.
      Returns:
      true if the header will show, false otherwise
    • setShowPageSummaryHeader

      public void setShowPageSummaryHeader(boolean showPageSummaryHeader)
      Set the page summary header to show or not show.
      Parameters:
      showPageSummaryHeader -