Class TreeGroup
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,DataBinding,Ordered,ScriptEventSupport,Container,Group,LifecycleElement,Helpable,org.springframework.core.Ordered
Group component that is backed by a
Tree data structure and typically
rendered as a tree in the user interface- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.kuali.rice.krad.uif.container.GroupBase
GroupBase.ACTION_VALIDATION_COMPONENTS -
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 TypeMethodDescriptionprotected voidaddNodeComponents(org.kuali.rice.core.api.util.tree.Node<Group, Message> node, List<Component> components) Retrieves theComponentinstances from the node for building the nested components listprotected voidbuildTreeGroups(Object model) Builds the components that will be rendered as part of the tree groupbuildTreeNode(org.kuali.rice.core.api.util.tree.Node<Object, String> nodeData, String bindingPrefix, String parentNode) Copies aNodeinstance and then recursively copies each of its child nodesReturns theBindingInfoinstance that is configured for the componentGets all node components prototypes within the tree.Gets all node components within the tree.Map<Class<?>, NodePrototype> Name of the property (relative to the parent object) the component binds togetTree()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 datavoidperformInitialization(Object model) The following actions are performed: Set fieldBindModelPath to the collection model path (since the fields have to belong to the same model as the collection) Set defaults for binding Calls view helper service to initialize prototypesvoidsetBindingInfo(BindingInfo bindingInfo) Setter for the binding info instancevoidsetDefaultNodePrototype(NodePrototype defaultNodePrototype) voidsetNodePrototypeMap(Map<Class<?>, NodePrototype> nodePrototypeMap) voidsetPropertyName(String propertyName) voidvoidsetTreeGroups(org.kuali.rice.core.api.util.tree.Tree<Group, Message> treeGroups) Methods inherited from class org.kuali.rice.krad.uif.container.GroupBase
afterEvaluateExpression, buildInputFieldValidationActionScript, completeValidation, getComponentTypeName, getDisclosure, getFieldBindByNamePrefix, getFieldBindingObjectPath, getItems, getScrollpane, getSupportedComponents, getWrapperTag, isAjaxDisclosureGroup, isRenderLoading, performFinalize, setDisclosure, setFieldBindByNamePrefix, setFieldBindingObjectPath, setItems, setNestedComponentId, setScrollpane, setupValidationScripts, setWrapperTag, validateInputFieldMethods inherited from class org.kuali.rice.krad.uif.container.ContainerBase
getAdditionalTemplates, getDefaultItemPosition, getEnterKeyAction, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, 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, afterEvaluateExpression, appendToStyle, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, 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
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, performFinalize, 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
-
TreeGroup
public TreeGroup()
-
-
Method Details
-
performInitialization
The following actions are performed:- Set fieldBindModelPath to the collection model path (since the fields have to belong to the same model as the collection)
- Set defaults for binding
- Calls view helper service to initialize prototypes
- Specified by:
performInitializationin interfaceLifecycleElement- Overrides:
performInitializationin classGroupBase- Parameters:
model- - object instance containing the view data- See Also:
-
performApplyModel
Description copied from class:ContainerBaseThe 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 classContainerBase- Parameters:
model- - Top level object containing the data (could be the form or a top level business object, dto)parent- parent lifecycle element
-
buildTreeGroups
Builds the components that will be rendered as part of the tree groupThe component tree group mirrors the tree data structure on the model. For each node of the data structure, a corresponding
Messagewill be created for the node label, and aGroupcomponent for the node data. These are placed into a new node for the component tree. After the tree is built it is set as a property on the tree group to be read by the renderer- Parameters:
model- object containing the view data from which the tree data will be retrieved
-
buildTreeNode
-
getNodeComponents
Gets all node components within the tree.- Returns:
- list of node components
-
getComponentPrototypes
Gets all node components prototypes within the tree.- Returns:
- list of node component prototypes
-
addNodeComponents
protected void addNodeComponents(org.kuali.rice.core.api.util.tree.Node<Group, Message> node, List<Component> components) Retrieves theComponentinstances from the node for building the nested components list- Parameters:
node- node to pull components fromcomponents- list to add components to
-
getPropertyName
Description copied from interface:DataBindingName of the property (relative to the parent object) the component binds to- Specified by:
getPropertyNamein interfaceDataBinding- Returns:
- String property name
-
setPropertyName
-
getBindingInfo
Description copied from interface:DataBindingReturns theBindingInfoinstance that is configured for the component- Specified by:
getBindingInfoin interfaceDataBinding- Returns:
- BindingInfo
- See Also:
-
setBindingInfo
Description copied from interface:DataBindingSetter for the binding info instance- Specified by:
setBindingInfoin interfaceDataBinding- Parameters:
bindingInfo-
-
getDefaultNodePrototype
- Returns:
- the defaultNodePrototype
-
setDefaultNodePrototype
- Parameters:
defaultNodePrototype- the defaultNodePrototype to set
-
getNodePrototypeMap
- Returns:
- the nodePrototypeMap
-
setNodePrototypeMap
- Parameters:
nodePrototypeMap- the nodePrototypeMap to set
-
getTreeGroups
-
setTreeGroups
-
getTree
-
setTree
-
copyNode
protected org.kuali.rice.core.api.util.tree.Node<Group,Message> copyNode(org.kuali.rice.core.api.util.tree.Node<Group, Message> node) Copies aNodeinstance and then recursively copies each of its child nodes- Parameters:
node- node instance to copy- Returns:
- new node instance copied from given node
-