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

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
                  extended by org.kuali.rice.krad.uif.element.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:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Constructor Summary
PageValidationMessages()
           
 
Method Summary
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).
 void generateMessages(View view, Object model, Component parent)
          Generates the messages based on the content in the messageMap
 boolean isShowPageSummaryHeader()
          If true, shows the page summary header (message count header message in the message block).
 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.
 void setShowPageSummaryHeader(boolean showPageSummaryHeader)
          Set the page summary header to show or not show.
 
Methods inherited from class org.kuali.rice.krad.uif.element.GroupValidationMessages
collectIdsFromItems, isCollapseAdditionalFieldLinkMessages, isDisplayFieldLabelWithMessages, isDisplayHeaderMessageSummary, setCollapseAdditionalFieldLinkMessages, setDisplayFieldLabelWithMessages, setDisplayHeaderMessageSummary
 
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

PageValidationMessages

public PageValidationMessages()
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 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 -


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