Package org.kuali.rice.krad.uif.element
Class PageValidationMessages
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
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:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidOverridding to prevent the initial writing of data attributes until the view has been processed and we collection unmatched messages (through the lifecycle event).voidgenerateMessages(View view, Object model, Component parent) Generates the messages based on the content in the messageMapbooleanIf true, shows the page summary header (message count header message in the message block).voidprocessEvent(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.voidsetShowPageSummaryHeader(boolean showPageSummaryHeader) Set the page summary header to show or not show.Methods inherited from class org.kuali.rice.krad.uif.element.GroupValidationMessages
collectIdsFromItems, isCloseable, isCollapseAdditionalFieldLinkMessages, isDisplayFieldLabelWithMessages, isDisplayHeaderMessageSummary, setCloseable, setCollapseAdditionalFieldLinkMessages, setDisplayFieldLabelWithMessages, setDisplayHeaderMessageSummaryMethods 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
-
PageValidationMessages
public PageValidationMessages()
-
-
Method Details
-
generateMessages
Generates the messages based on the content in the messageMap- Overrides:
generateMessagesin classGroupValidationMessages- Parameters:
view- the current Viewmodel- the current modelparent- the parent of this ValidationMessages
-
addValidationMessageDataAttributes
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:
addValidationMessageDataAttributesin classGroupValidationMessages- 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:
processEventin interfaceLifecycleEventListener- Parameters:
lifecycleEvent- event that occurredview- view instance the lifecycle is being processed formodel- object containing the model dataeventElement- 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-
-