Class ContainerBase
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,Container,LifecycleElement,Helpable,org.springframework.core.Ordered
Container implementation which container implementations
can extend
Provides properties for the basic Container functionality in
addition to default implementation of the lifecycle methods including some
setup of the header, items list, and layout manager
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptionsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCodeFields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.Gets additional templates that will be required during the rendering of this component.intForComponentinstances in the container's items list that do not have an order set, a default order number will be assigned using this property.Get the key of the action item to invoke upon pressing the enter key.FooterGroupassociated with the containerHeaderFieldassociated with the containerConvenience getter for the header textgetHelp()Help configuration object for the containerHelp title which is used for the HTML title attribute of the help iconMessage field that displays instructional textText explaining how complete the group inputs, including things like what values should be selected in certain cases, what fields should be completed and so on (instructions)getItems()ListofComponentinstances that are held by the containerLayoutManagerthat should be used to layout the components in the containerField that contains the error messages for the containerbooleanDetermine if remote field holders should be processed for this container.voidperformApplyModel(Object model, LifecycleElement parent) The following updates are done here: Evaluate the progressive render condition (if set) and combine with the current render status to set the render status Called after the initialize phase to perform conditional logic based on the model datavoidperformFinalize(Object model, LifecycleElement parent) The following finalization is performed: Sets the headerText of the header Group if it is blank Set the messageText of the summary Message if it is blank Finalizes LayoutManager The following finalization is done here: progressiveRender and conditionalRefresh variables are processed if set If any of the style properties were given, sets the style string on the style property Set the skipInTabOrder flag for nested components The last phase before the view is renderedvoidperformInitialization(Object model) The following initialization is performed: Sorts the containers list of components Initializes the instructional field if necessary Initializes LayoutManager The following updates are done here: Invoke performInitialize on component modifiers Initializes the componentvoidsetDefaultItemPosition(int defaultItemPosition) Setter for the container's item ordering sequence number (initial value)voidsetEnterKeyAction(String enterKeyAction) voidvoidvoidsetHeaderText(String headerText) Convenience setter for configuration to set the header textvoidSetter for the containers help contentvoidsetInstructionalMessage(Message instructionalMessage) Setter for the instructional text message fieldvoidsetInstructionalText(String instructionalText) Setter for the instructional messageabstract voidSetter for the containers list of componentsvoidsetLayoutManager(LayoutManager layoutManager) voidsetRenderFooter(boolean renderFooter) Convenience setter for configuration to turn rendering of the footer on/offvoidsetRenderHeader(boolean renderHeader) Convenience setter for configuration to turn rendering of the header on/offvoidsetTooltipOfComponent(Tooltip tooltip) Setter for the component's tooltip.voidsetValidationMessages(ValidationMessages validationMessages) voidPerforms sorting of the container items based on the order propertyMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, afterEvaluateExpression, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
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.uif.component.Component
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, afterEvaluateExpression, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getComponentTypeName, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyleMethods inherited from interface org.kuali.rice.krad.uif.container.Container
getSupportedComponentsMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycleMethods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScriptMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Constructor Details
-
ContainerBase
public ContainerBase()Default Constructor
-
-
Method Details
-
isProcessRemoteFieldHolders
public boolean isProcessRemoteFieldHolders()Determine if remote field holders should be processed for this container.- Specified by:
isProcessRemoteFieldHoldersin interfaceContainer- Returns:
- True if remote field holders should be processed for this container.
-
performInitialization
The following initialization is performed:- Sorts the containers list of components
- Initializes the instructional field if necessary
- Initializes LayoutManager
- Invoke performInitialize on component modifiers
Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.
- Specified by:
performInitializationin interfaceLifecycleElement- Overrides:
performInitializationin classComponentBase- Parameters:
model- - object instance containing the view data- See Also:
-
performApplyModel
The following updates are done here:- Evaluate the progressive render condition (if set) and combine with the current render status to set the render status
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
- Specified by:
performApplyModelin interfaceLifecycleElement- Overrides:
performApplyModelin classComponentBase- Parameters:
model- - Top level object containing the data (could be the form or a top level business object, dto)parent- parent lifecycle element
-
performFinalize
The following finalization is performed:- Sets the headerText of the header Group if it is blank
- Set the messageText of the summary Message if it is blank
- Finalizes LayoutManager
- progressiveRender and conditionalRefresh variables are processed if set
- If any of the style properties were given, sets the style string on the style property
- Set the skipInTabOrder flag for nested components
Here final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classComponentBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
getAdditionalTemplates
Gets additional templates that will be required during the rendering of this component.If a parent or sibling component is referred to by this component's template, include that component's template here to ensure that it has been compiled already during bottom-up inline rendering.
- Specified by:
getAdditionalTemplatesin interfaceComponent- Overrides:
getAdditionalTemplatesin classComponentBase- Returns:
- additional templates required during rendering
-
sortItems
public void sortItems()Performs sorting of the container items based on the order property -
getValidationMessages
Field that contains the error messages for the containerContainers can collect the errors for the contained component and display either all the messages or counts. This
Fieldis used to render those messages. Styling and other configuration is done through theValidationMessages- Specified by:
getValidationMessagesin interfaceContainer- Returns:
- ValidationMessages holding the container errors
-
setValidationMessages
- Specified by:
setValidationMessagesin interfaceContainer- See Also:
-
getHelp
Help configuration object for the containerExternal help information can be configured for the container. The
Helpobject can the configuration for rendering a link to that help information. -
setHelp
Setter for the containers help content -
setTooltipOfComponent
Setter for the component's tooltip.This is used by the helper to set the help content to the tooltip.
- Specified by:
setTooltipOfComponentin interfaceHelpable- Parameters:
tooltip- Tooltip with the help for the container
-
getHelpTitle
Help title which is used for the HTML title attribute of the help icon- Specified by:
getHelpTitlein interfaceHelpable- Returns:
- Help title for the container
-
getItems
ListofComponentinstances that are held by the containerContained components are rendered within the section template by calling the associated
LayoutManager. -
setItems
Setter for the containers list of components -
getDefaultItemPosition
public int getDefaultItemPosition()ForComponentinstances in the container's items list that do not have an order set, a default order number will be assigned using this property. The first component found in the list without an order will be assigned the configured initial value, and incremented by one for each component (without an order) found afterwards- Returns:
- int order sequence
-
setDefaultItemPosition
public void setDefaultItemPosition(int defaultItemPosition) Setter for the container's item ordering sequence number (initial value)- Parameters:
defaultItemPosition-
-
getLayoutManager
LayoutManagerthat should be used to layout the components in the containerThe template associated with the layout manager will be invoked passing in the List of components from the container. This list is exported under the attribute name 'items'
- Specified by:
getLayoutManagerin interfaceContainer- Returns:
- LayoutManager instance
-
setLayoutManager
- Specified by:
setLayoutManagerin interfaceContainer- See Also:
-
getHeader
HeaderFieldassociated with the containerHeader fields are generally rendered at the beginning of the container to indicate a grouping, although this is determined by the template associated with the container. The actual rendering configuration (style and so on) is configured within the HeaderField instance
Header is only rendered if
Container#isRenderHeaderis true and getHeader() is not null -
setHeader
-
setRenderHeader
public void setRenderHeader(boolean renderHeader) Convenience setter for configuration to turn rendering of the header on/offFor nested groups (like Field Groups) it is often necessary to only show the container body (the contained components). This method allows the header to not be displayed
- Parameters:
renderHeader-
-
getHeaderText
Convenience getter for the header text- Returns:
- The text that should be displayed on the header
-
setHeaderText
Convenience setter for configuration to set the header text- Parameters:
headerText- the text that should be displayed on the header.
-
getInstructionalText
Text explaining how complete the group inputs, including things like what values should be selected in certain cases, what fields should be completed and so on (instructions)- Returns:
- instructional message
-
setInstructionalText
Setter for the instructional message- Parameters:
instructionalText-
-
getInstructionalMessage
Message field that displays instructional textThis message field can be configured to for adjusting how the instructional text will display. Generally the styleClasses property will be of most interest
- Specified by:
getInstructionalMessagein interfaceContainer- Returns:
- instructional message field
-
setInstructionalMessage
Setter for the instructional text message fieldNote this is the setter for the field that will render the instructional text. The actual text can be set on the field but can also be set using
setInstructionalText(String)- Specified by:
setInstructionalMessagein interfaceContainer- Parameters:
instructionalMessage-- See Also:
-
getEnterKeyAction
Get the key of the action item to invoke upon pressing the enter key.- Specified by:
getEnterKeyActionin interfaceContainer- Returns:
- String enterKeyAction
-
setEnterKeyAction
- Specified by:
setEnterKeyActionin interfaceContainer- See Also:
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Specified by:
completeValidationin interfaceComponent- Overrides:
completeValidationin classComponentBase- Parameters:
tracer- Record of component's location
-