public abstract class ContainerBase extends ComponentBase implements Container
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
templateOptions
componentCode, namespaceCode
INITIAL_ORDER_VALUE
Constructor and Description |
---|
ContainerBase()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
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. |
String |
getEnterKeyAction()
Get the key of the action item to invoke upon pressing the enter key.
|
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()
Help title which is used for the HTML title attribute of the help icon
|
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
The following updates are done here:
Invoke performInitialize on component modifiers
Initializes the component
|
void |
setDefaultItemPosition(int defaultItemPosition)
Setter for the container's item ordering sequence number (initial value)
|
void |
setEnterKeyAction(String enterKeyAction) |
void |
setFooter(Group footer) |
void |
setHeader(Header header) |
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) |
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)
Setter for the component's tooltip.
|
void |
setValidationMessages(ValidationMessages validationMessages) |
void |
sortItems()
Performs sorting of the container items based on the order property
|
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, skipLifecycle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSupportedComponents
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, setWrapperStyle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycle
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
public ContainerBase()
public boolean isProcessRemoteFieldHolders()
isProcessRemoteFieldHolders
in interface Container
public void performInitialization(Object model)
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.
performInitialization
in interface LifecycleElement
performInitialization
in class ComponentBase
model
- - object instance containing the view dataComponentDefaultInitializeTask
public void performApplyModel(Object model, LifecycleElement parent)
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
performApplyModel
in interface LifecycleElement
performApplyModel
in class ComponentBase
model
- - Top level object containing the data (could be the form or a
top level business object, dto)parent
- parent lifecycle elementpublic void performFinalize(Object model, LifecycleElement parent)
Here final preparations can be made based on the updated view state.
performFinalize
in interface LifecycleElement
performFinalize
in class ComponentBase
model
- - top level object containing the dataparent
- - parent componentpublic List<String> getAdditionalTemplates()
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.
getAdditionalTemplates
in interface Component
getAdditionalTemplates
in class ComponentBase
public void sortItems()
@ViewLifecycleRestriction public ValidationMessages getValidationMessages()
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
getValidationMessages
in interface Container
public void setValidationMessages(ValidationMessages validationMessages)
setValidationMessages
in interface Container
Container.getValidationMessages()
public Help getHelp()
External help information can be configured for the container. The
Help
object can the configuration for rendering a link to
that help information.
public void setTooltipOfComponent(Tooltip tooltip)
This is used by the helper to set the help content to the tooltip.
setTooltipOfComponent
in interface Helpable
tooltip
- Tooltip with the help for the containerpublic String getHelpTitle()
getHelpTitle
in interface Helpable
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
.
public abstract void setItems(List<? extends Component> items)
public int getDefaultItemPosition()
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 afterwardspublic void setDefaultItemPosition(int defaultItemPosition)
defaultItemPosition
- 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'
getLayoutManager
in interface Container
public void setLayoutManager(LayoutManager layoutManager)
setLayoutManager
in interface Container
Container.getLayoutManager()
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
public void setHeader(Header header)
setHeader
in interface Container
Container.getHeader()
public Group getFooter()
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
public void setFooter(Group footer)
setFooter
in interface Container
Container.getFooter()
public void setRenderHeader(boolean renderHeader)
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
renderHeader
- public String getHeaderText()
public void setHeaderText(String headerText)
headerText
- the text that should be displayed on the header.public void setRenderFooter(boolean renderFooter)
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
renderFooter
- public String getInstructionalText()
public void setInstructionalText(String instructionalText)
instructionalText
- public Message getInstructionalMessage()
This message field can be configured to for adjusting how the instructional text will display. Generally the styleClasses property will be of most interest
getInstructionalMessage
in interface Container
public void setInstructionalMessage(Message instructionalMessage)
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)
setInstructionalMessage
in interface Container
instructionalMessage
- Container.getInstructionalMessage()
public String getEnterKeyAction()
getEnterKeyAction
in interface Container
public void setEnterKeyAction(String enterKeyAction)
setEnterKeyAction
in interface Container
Container.getEnterKeyAction()
public void completeValidation(ValidationTrace tracer)
completeValidation
in interface Component
completeValidation
in class ComponentBase
tracer
- Record of component's locationCopyright © 2005–2016 The Kuali Foundation. All rights reserved.