Class GroupBase
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,Container,Group,LifecycleElement,Helpable,org.springframework.core.Ordered
- Direct Known Subclasses:
AccordionGroup,CollectionGroupBase,DialogGroup,LightTable,LinkGroup,PageGroupBase,SidebarNavigationGroup,TabGroup,TabNavigationGroup,TreeGroup
Field or other Group
instances
Groups can exist at different levels of the View, providing
conceptual groupings such as the page, section, and group. In addition, other
group types can be created to add behavior like collection support
Group implementation has properties for defaulting the binding
information (such as the parent object path and a binding prefix) for the
fields it contains. During the phase these properties (if given) are set on
the fields contained in the Group that implement
DataBinding, unless they have already been set on the field.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Nested Class Summary
Nested Classes -
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 TypeMethodDescriptionvoidNo-op implementation.protected StringbuildInputFieldValidationActionScript(List<InputField> allInputFields, List<String> excludedFields) Helper method to build action script for input fields with actions that depend on the validation of other input fields in the same group.voidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.The name for the component typeDisclosure widget that provides collapse/expand functionality for the groupBinding prefix string to set on each of the groupsDataFieldinstancesObject binding path to set on each of the group'sInputFieldinstancesgetItems()ListofComponentinstances that are held by the containerScrollpane widget that provides scrolling functionality for the groupSetofComponentclasses that may be placed into the containerDefines the html tag that will wrap this group, if left blank, this will automatically be set by the framework to the appropriate tag (in most cases section or div)protected booleanReturns true if this group has a Disclosure widget that is currently closed and using ajax disclosurebooleanDetermine the group should be rendered on initial load, or if a loading message should be rendered instead.voidperformFinalize(Object model, LifecycleElement parent) Sets the section boolean to true if this group has a rendering header with text 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 componentvoidsetDisclosure(Disclosure disclosure) Setter for the group's disclosure instancevoidsetFieldBindByNamePrefix(String fieldBindByNamePrefix) Setter for the field binding prefixvoidsetFieldBindingObjectPath(String fieldBindingObjectPath) Setter for the field object binding pathvoidSetter for the containers list of componentsprotected voidsetNestedComponentId(Component component, String newId) Helper method for setting a new ID for the nested componentsvoidsetScrollpane(Scrollpane scrollpane) Setter for the group's scrollpane instanceprotected voidsetupValidationScripts(GroupBase.ACTION_VALIDATION_COMPONENTS... componentsToValidate) Helper method to set the validation action scripts for widgets (at the very least, quickfinders, and currently, at the most, inquiries also).voidsetWrapperTag(String wrapperTag) protected booleanvalidateInputField(InputField inputField) Helper method to determine whether the given input field needs validated or not.Methods inherited from class org.kuali.rice.krad.uif.container.ContainerBase
getAdditionalTemplates, getDefaultItemPosition, getEnterKeyAction, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, performApplyModel, setDefaultItemPosition, setEnterKeyAction, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages, sortItemsMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, 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, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, 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
getEnterKeyAction, getFooter, getHeader, getInstructionalMessage, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, setEnterKeyAction, setFooter, setHeader, setInstructionalMessage, setLayoutManager, setValidationMessages, sortItemsMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.container.Group
getHeaderText, setHeaderText, setRenderFooterMethods inherited from interface org.kuali.rice.krad.uif.widget.Helpable
getHelp, getHelpTitle, setHelp, setTooltipOfComponentMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, 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
-
GroupBase
public GroupBase()Default Constructor
-
-
Method Details
-
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 classContainerBase- Parameters:
model- - object instance containing the view data- See Also:
-
afterEvaluateExpression
public void afterEvaluateExpression()No-op implementation. Override for custom behavior in subclasses. Invoked by the view lifecycle after expressions are evaluated at the apply model phase.In general, this method is preferred to
LifecycleElement.performApplyModel(Object, LifecycleElement)for populating model data via code, since it is called before client-side state is synchronize.- Specified by:
afterEvaluateExpressionin interfaceComponent- Overrides:
afterEvaluateExpressionin classComponentBase
-
performFinalize
Sets the section boolean to true if this group has a rendering header with text 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 classContainerBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
setupValidationScripts
protected void setupValidationScripts(GroupBase.ACTION_VALIDATION_COMPONENTS... componentsToValidate) Helper method to set the validation action scripts for widgets (at the very least, quickfinders, and currently, at the most, inquiries also).- Parameters:
componentsToValidate- the list of components with actions to validate
-
buildInputFieldValidationActionScript
protected String buildInputFieldValidationActionScript(List<InputField> allInputFields, List<String> excludedFields) Helper method to build action script for input fields with actions that depend on the validation of other input fields in the same group.- Parameters:
allInputFields- all other input fields that might have validation constraintsexcludedFields- fields that shouldn't be part of the validation script- Returns:
- the validation action script
-
validateInputField
Helper method to determine whether the given input field needs validated or not.- Parameters:
inputField- the field to check for validation- Returns:
- whether validation should be done
-
setNestedComponentId
Helper method for setting a new ID for the nested components- Parameters:
component- component to adjust ID fornewId-
-
getSupportedComponents
SetofComponentclasses that may be placed into the containerIf an empty or null list is returned, it is assumed the container supports all components. The returned set will be used by dictionary validators and allows renders to make assumptions about the contained components
- Specified by:
getSupportedComponentsin interfaceContainer- Returns:
- Set component classes
-
getComponentTypeName
The name for the component typeThis is used within the rendering layer to pass the component instance into the template. The component instance is exported under the name given by this method.
- Specified by:
getComponentTypeNamein interfaceComponent- Returns:
- String type name
-
getFieldBindByNamePrefix
Binding prefix string to set on each of the groupsDataFieldinstancesAs opposed to setting the bindingPrefix on each attribute field instance, it can be set here for the group. During initialize the string will then be set on each attribute field instance if the bindingPrefix is blank and not a form field
- Specified by:
getFieldBindByNamePrefixin interfaceGroup- Returns:
- String binding prefix to set
-
setFieldBindByNamePrefix
Setter for the field binding prefix- Specified by:
setFieldBindByNamePrefixin interfaceGroup- Parameters:
fieldBindByNamePrefix-
-
getFieldBindingObjectPath
Object binding path to set on each of the group'sInputFieldinstancesWhen the attributes of the group belong to a object whose path is different from the default then this property can be given to set each of the attributes instead of setting the model path on each one. The object path can be overridden at the attribute level. The object path is set to the fieldBindingObjectPath during the initialize phase.
- Specified by:
getFieldBindingObjectPathin interfaceGroup- Returns:
- String model path to set
- See Also:
-
setFieldBindingObjectPath
Setter for the field object binding path- Specified by:
setFieldBindingObjectPathin interfaceGroup- Parameters:
fieldBindingObjectPath-
-
getDisclosure
Disclosure widget that provides collapse/expand functionality for the group- Specified by:
getDisclosurein interfaceGroup- Returns:
- Disclosure instance
-
setDisclosure
Setter for the group's disclosure instance- Specified by:
setDisclosurein interfaceGroup- Parameters:
disclosure-
-
getScrollpane
Scrollpane widget that provides scrolling functionality for the group- Specified by:
getScrollpanein interfaceGroup- Returns:
- Scrollpane instance
-
setScrollpane
Setter for the group's scrollpane instance- Specified by:
setScrollpanein interfaceGroup- Parameters:
scrollpane-
-
getItems
ListofComponentinstances that are held by the containerContained components are rendered within the section template by calling the associated
LayoutManager.- Specified by:
getItemsin interfaceContainer- Specified by:
getItemsin classContainerBase- Returns:
- List component instances
-
setItems
Setter for the containers list of components- Specified by:
setItemsin interfaceContainer- Specified by:
setItemsin classContainerBase- Parameters:
items-
-
getWrapperTag
Defines the html tag that will wrap this group, if left blank, this will automatically be set by the framework to the appropriate tag (in most cases section or div)- Specified by:
getWrapperTagin interfaceGroup- Returns:
- the html tag used to wrap this group
-
setWrapperTag
- Specified by:
setWrapperTagin interfaceGroup- See Also:
-
isAjaxDisclosureGroup
protected boolean isAjaxDisclosureGroup()Returns true if this group has a Disclosure widget that is currently closed and using ajax disclosure- Returns:
- true if this group has a Disclosure widget that is currently closed and using ajax disclosure
-
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 classContainerBase- Parameters:
tracer- Record of component's location
-
isRenderLoading
public boolean isRenderLoading()Determine the group should be rendered on initial load, or if a loading message should be rendered instead.- Specified by:
isRenderLoadingin interfaceGroup- Returns:
- True if a loading message should be rendered, false if the group should be rendered now.
-