org.kuali.rice.krad.uif.container
Class ContainerBase

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.component.ComponentBase
              extended by org.kuali.rice.krad.uif.container.ContainerBase
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, Container, LifecycleElement, Helpable, org.springframework.core.Ordered
Direct Known Subclasses:
GroupBase, View

public abstract class ContainerBase
extends ComponentBase
implements Container

Base 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:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptions
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
ContainerBase()
          Default Constructor
 
Method Summary
 void completeValidation(ValidationTrace tracer)
          Validates different requirements of component compiling a series of reports detailing information on errors found in the component.
 List<String> getAdditionalTemplates()
          Gets additional templates that will be required during the rendering of this component.
 int getDefaultItemPosition()
          For Component instances in the container's items list that do not have an order set, a default order number will be assigned using this property.
 Group getFooter()
          Footer Group associated with the container
 Header getHeader()
          HeaderField associated with the container
 String getHeaderText()
          Convenience getter for the header text
 Help getHelp()
          Help configuration object for the container
 String getHelpTitle()
          Return the container header text for the help title
 Message getInstructionalMessage()
          Message field that displays instructional text
 String 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)
abstract  List<? extends Component> getItems()
          List of Component instances that are held by the container
 LayoutManager getLayoutManager()
          LayoutManager that should be used to layout the components in the container
 ValidationMessages getValidationMessages()
          Field that contains the error messages for the container
 boolean isProcessRemoteFieldHolders()
          Determine if remote field holders should be processed for this container.
 void performApplyModel(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 data
 void performFinalize(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 rendered
 void performInitialization(Object model)
          The following initialization is performed: Sorts the containers list of components Initializes the instructional field if necessary Initializes LayoutManager Initializes the component
 void setDefaultItemPosition(int defaultItemPosition)
          Setter for the container's item ordering sequence number (initial value)
 void setFooter(Group footer)
          Setter for the containers footer
 void setHeader(Header header)
          Setter for the containers header field
 void setHeaderText(String headerText)
          Convenience setter for configuration to set the header text
 void setHelp(Help help)
          Setter for the containers help content
 void setInstructionalMessage(Message instructionalMessage)
          Setter for the instructional text message field
 void setInstructionalText(String instructionalText)
          Setter for the instructional message
abstract  void setItems(List<? extends Component> items)
          Setter for the containers list of components
 void setLayoutManager(LayoutManager layoutManager)
          Setter for the containers layout manager
 void setRenderFooter(boolean renderFooter)
          Convenience setter for configuration to turn rendering of the footer on/off
 void setRenderHeader(boolean renderHeader)
          Convenience setter for configuration to turn rendering of the header on/off
 void setTooltipOfComponent(Tooltip tooltip)
          For containers the help tooltip is placed on the header.
 void setValidationMessages(ValidationMessages validationMessages)
          Setter for the containers errors field
 void sortItems()
          Performs sorting of the container items based on the order property
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, 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, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, initializePendingTasks, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, preventModification, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, 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, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycle
 
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
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, 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.uif.container.Container
getSupportedComponents
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getComponentTypeName, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContext, getId, getPhasePathMapping, getViewPath, getViewStatus, initializePendingTasks, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setContext, setId, setPhasePathMapping, setRender, setViewPath, setViewStatus, skipLifecycle
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.Copyable
clone, copy, preventModification, unwrap
 
Methods 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, setOnUnloadScript
 

Constructor Detail

ContainerBase

public ContainerBase()
Default Constructor

Method Detail

isProcessRemoteFieldHolders

public boolean isProcessRemoteFieldHolders()
Determine if remote field holders should be processed for this container.

Specified by:
isProcessRemoteFieldHolders in interface Container
Returns:
True if remote field holders should be processed for this container.

performInitialization

public void performInitialization(Object model)
The following initialization is performed: Initializes the component

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:
performInitialization in interface LifecycleElement
Overrides:
performInitialization in class ComponentBase
Parameters:
model - - object instance containing the view data
See Also:
ComponentDefaultInitializeTask

performApplyModel

public void performApplyModel(Object model,
                              LifecycleElement parent)
The following updates are done here: Called after the initialize phase to perform conditional logic based on the model data

Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data

Specified by:
performApplyModel in interface LifecycleElement
Overrides:
performApplyModel in class ComponentBase
Parameters:
model - - Top level object containing the data (could be the form or a top level business object, dto)
parent - parent lifecycle element

performFinalize

public void performFinalize(Object model,
                            LifecycleElement parent)
The following finalization is performed: The following finalization is done here: The last phase before the view is rendered

Here final preparations can be made based on the updated view state.

Specified by:
performFinalize in interface LifecycleElement
Overrides:
performFinalize in class ComponentBase
Parameters:
model - - top level object containing the data
parent - - parent component

getAdditionalTemplates

public List<String> 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:
getAdditionalTemplates in interface Component
Overrides:
getAdditionalTemplates in class ComponentBase
Returns:
additional templates required during rendering

sortItems

public void sortItems()
Performs sorting of the container items based on the order property

Specified by:
sortItems in interface Container

getValidationMessages

@ViewLifecycleRestriction
public ValidationMessages getValidationMessages()
Description copied from interface: Container
Field that contains the error messages for the container

Containers can collect the errors for the contained component and display either all the messages or counts. This Field is used to render those messages. Styling and other configuration is done through the ValidationMessages

Specified by:
getValidationMessages in interface Container
Returns:
ValidationMessages holding the container errors
See Also:
Container.getValidationMessages()

setValidationMessages

public void setValidationMessages(ValidationMessages validationMessages)
Setter for the containers errors field

Specified by:
setValidationMessages in interface Container

getHelp

public Help getHelp()
Description copied from interface: Helpable
Help configuration object for the container

External help information can be configured for the container. The Help object can the configuration for rendering a link to that help information.

Specified by:
getHelp in interface Helpable
Returns:
Help for container
See Also:
Helpable.getHelp()

setHelp

public void setHelp(Help help)
Description copied from interface: Helpable
Setter for the containers help content

Specified by:
setHelp in interface Helpable
See Also:
Helpable.setHelp(org.kuali.rice.krad.uif.widget.Help)

setTooltipOfComponent

public void setTooltipOfComponent(Tooltip tooltip)
For containers the help tooltip is placed on the header.

Specified by:
setTooltipOfComponent in interface Helpable
Parameters:
tooltip - Tooltip with the help for the container
See Also:
Helpable.setTooltipOfComponent(org.kuali.rice.krad.uif.widget.Tooltip)

getHelpTitle

public String getHelpTitle()
Return the container header text for the help title

Specified by:
getHelpTitle in interface Helpable
Returns:
container title
See Also:
Helpable.setTooltipOfComponent(org.kuali.rice.krad.uif.widget.Tooltip)

getItems

public abstract List<? extends Component> getItems()
List of Component instances that are held by the container

Contained components are rendered within the section template by calling the associated LayoutManager.

Specified by:
getItems in interface Container
Returns:
List component instances

setItems

public abstract void setItems(List<? extends Component> items)
Setter for the containers list of components

Specified by:
setItems in interface Container
Parameters:
items -

getDefaultItemPosition

public int getDefaultItemPosition()
For Component instances 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

public LayoutManager getLayoutManager()
LayoutManager that should be used to layout the components in the container

The 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:
getLayoutManager in interface Container
Returns:
LayoutManager instance

setLayoutManager

public void setLayoutManager(LayoutManager layoutManager)
Setter for the containers layout manager

Specified by:
setLayoutManager in interface Container

getHeader

public Header getHeader()
HeaderField associated with the container

Header 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#isRenderHeader is true and getHeader() is not null

Specified by:
getHeader in interface Container
Returns:
HeaderField instance or Null

setHeader

public void setHeader(Header header)
Setter for the containers header field

Specified by:
setHeader in interface Container

getFooter

public Group getFooter()
Footer Group associated with the container

The footer is usually rendered at the end of the container. Often this is a place to put actions (buttons) for the container.

Footer is only rendered if Container#isRenderFooter is true and getFooter is not null

Specified by:
getFooter in interface Container
Returns:
Group footer instance or Null

setFooter

public void setFooter(Group footer)
Setter for the containers footer

Specified by:
setFooter in interface Container

setRenderHeader

public void setRenderHeader(boolean renderHeader)
Convenience setter for configuration to turn rendering of the header on/off

For 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

public String getHeaderText()
Convenience getter for the header text

Returns:
The text that should be displayed on the header

setHeaderText

public void setHeaderText(String headerText)
Convenience setter for configuration to set the header text

Parameters:
headerText - the text that should be displayed on the header.

setRenderFooter

public void setRenderFooter(boolean renderFooter)
Convenience setter for configuration to turn rendering of the footer on/off

For nested groups it is often necessary to only show the container body (the contained components). This method allows the footer to not be displayed

Parameters:
renderFooter -

getInstructionalText

public String 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

public void setInstructionalText(String instructionalText)
Setter for the instructional message

Parameters:
instructionalText -

getInstructionalMessage

public Message getInstructionalMessage()
Message field that displays instructional text

This 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:
getInstructionalMessage in interface Container
Returns:
instructional message field

setInstructionalMessage

public void setInstructionalMessage(Message instructionalMessage)
Setter for the instructional text message field

Note 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:
setInstructionalMessage in interface Container
Parameters:
instructionalMessage -

completeValidation

public void completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.

Specified by:
completeValidation in interface Component
Overrides:
completeValidation in class ComponentBase
Parameters:
tracer - Record of component's location


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