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

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
                  extended by org.kuali.rice.krad.uif.container.Group
                      extended by org.kuali.rice.krad.uif.container.TreeGroup
All Implemented Interfaces:
Serializable, Cloneable, DictionaryBean, UifDictionaryBean, Component, DataBinding, ScriptEventSupport, Container, Helpable, org.springframework.core.Ordered

public class TreeGroup
extends Group
implements DataBinding

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

Field Summary
 
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
TreeGroup()
           
 
Method Summary
protected  void addNodeComponents(Node<Group,Message> node, List<Component> components)
          Retrieves the Component instances from the node for building the nested components list
protected  void buildTreeGroups(View view, Object model)
          Builds the components that will be rendered as part of the tree group
protected  Node<Group,Message> buildTreeNode(Node<Object,String> nodeData, String bindingPrefix, String parentNode)
           
protected  Node<Group,Message> copyNode(Node<Group,Message> node)
          Copies a Node instance and then recursively copies each of its child nodes
protected
<T> void
copyProperties(T component)
          Copies the properties over for the copy method
 BindingInfo getBindingInfo()
          Returns the BindingInfo instance that is configured for the component
 List<Component> getComponentPrototypes()
          List of components that are maintained by the component as prototypes for creating other component instances
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 NodePrototype getDefaultNodePrototype()
           
 Map<Class<?>,NodePrototype> getNodePrototypeMap()
           
 String getPropertyName()
          Name of the property (relative to the parent object) the component binds to
 Tree getTree()
           
 Tree<Group,Message> getTreeGroups()
           
 void performApplyModel(View view, Object model, Component 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
 void performInitialization(View view, 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 prototypes
 void setBindingInfo(BindingInfo bindingInfo)
          Setter for the binding info instance
 void setDefaultNodePrototype(NodePrototype defaultNodePrototype)
           
 void setNodePrototypeMap(Map<Class<?>,NodePrototype> nodePrototypeMap)
           
 void setPropertyName(String propertyName)
           
 void setTree(Tree tree)
           
 void setTreeGroups(Tree<Group,Message> treeGroups)
           
 
Methods inherited from class org.kuali.rice.krad.uif.container.Group
completeValidation, getComponentTypeName, getDisclosure, getFieldBindByNamePrefix, getFieldBindingObjectPath, getItems, getScrollpane, getSupportedComponents, setDisclosure, setFieldBindByNamePrefix, setFieldBindingObjectPath, setItems, setScrollpane
 
Methods inherited from class org.kuali.rice.krad.uif.container.ContainerBase
getDefaultItemPosition, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, performFinalize, setDefaultItemPosition, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages, sortItems
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, isUseAjaxCallForContent, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setUseAjaxCallForContent, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addCellCssClass, addDataAttribute, addStyleClass, appendToStyle, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isUseAjaxCallForContent, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setUseAjaxCallForContent, setValign, setWidth
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
 

Constructor Detail

TreeGroup

public TreeGroup()
Method Detail

performInitialization

public void performInitialization(View view,
                                  Object model)
The following actions are performed:

Specified by:
performInitialization in interface Component
Overrides:
performInitialization in class Group
Parameters:
view - - view instance in which the component belongs
model - - object instance containing the view data
See Also:
ComponentBase.performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)

performApplyModel

public void performApplyModel(View view,
                              Object model,
                              Component parent)
Description copied from class: ComponentBase
The following updates are done here:

Specified by:
performApplyModel in interface Component
Overrides:
performApplyModel in class ContainerBase
Parameters:
view - - view instance to which the component belongs
model - - Top level object containing the data (could be the form or a top level business object, dto)
See Also:
ComponentBase.performApplyModel(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.component.Component)

buildTreeGroups

protected void buildTreeGroups(View view,
                               Object model)
Builds the components that will be rendered as part of the tree group

The component tree group mirrors the tree data structure on the model. For each node of the data structure, a corresponding Message will be created for the node label, and a Group component 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:
view - view instance the tree group belongs to
model - object containing the view data from which the tree data will be retrieved

buildTreeNode

protected Node<Group,Message> buildTreeNode(Node<Object,String> nodeData,
                                            String bindingPrefix,
                                            String parentNode)

getComponentsForLifecycle

public List<Component> getComponentsForLifecycle()
Description copied from interface: Component
List of components that are contained within the component and should be sent through the lifecycle

Used by ViewHelperService for the various lifecycle callbacks

Specified by:
getComponentsForLifecycle in interface Component
Overrides:
getComponentsForLifecycle in class Group
Returns:
List child components
See Also:
Component.getComponentsForLifecycle()

getComponentPrototypes

public List<Component> getComponentPrototypes()
Description copied from interface: Component
List of components that are maintained by the component as prototypes for creating other component instances

Prototypes are held for configuring how a component should be created during the lifecycle. An example of this are the fields in a collection group that are created for each collection record. They only participate in the initialize phase.

Specified by:
getComponentPrototypes in interface Component
Overrides:
getComponentPrototypes in class ContainerBase
Returns:
List child component prototypes
See Also:
Component.getComponentPrototypes()

addNodeComponents

protected void addNodeComponents(Node<Group,Message> node,
                                 List<Component> components)
Retrieves the Component instances from the node for building the nested components list

Parameters:
node - node to pull components from
components - list to add components to

getPropertyName

public String getPropertyName()
Description copied from interface: DataBinding
Name of the property (relative to the parent object) the component binds to

Specified by:
getPropertyName in interface DataBinding
Returns:
String property name

setPropertyName

public void setPropertyName(String propertyName)

getBindingInfo

public BindingInfo getBindingInfo()
Description copied from interface: DataBinding
Returns the BindingInfo instance that is configured for the component

Specified by:
getBindingInfo in interface DataBinding
Returns:
BindingInfo
See Also:
BindingInfo

setBindingInfo

public void setBindingInfo(BindingInfo bindingInfo)
Description copied from interface: DataBinding
Setter for the binding info instance

Specified by:
setBindingInfo in interface DataBinding

getDefaultNodePrototype

public NodePrototype getDefaultNodePrototype()
Returns:
the defaultNodePrototype

setDefaultNodePrototype

public void setDefaultNodePrototype(NodePrototype defaultNodePrototype)
Parameters:
defaultNodePrototype - the defaultNodePrototype to set

getNodePrototypeMap

public Map<Class<?>,NodePrototype> getNodePrototypeMap()
Returns:
the nodePrototypeMap

setNodePrototypeMap

public void setNodePrototypeMap(Map<Class<?>,NodePrototype> nodePrototypeMap)
Parameters:
nodePrototypeMap - the nodePrototypeMap to set

getTreeGroups

public Tree<Group,Message> getTreeGroups()

setTreeGroups

public void setTreeGroups(Tree<Group,Message> treeGroups)

getTree

public Tree getTree()

setTree

public void setTree(Tree tree)

copyProperties

protected <T> void copyProperties(T component)
Description copied from class: ComponentBase
Copies the properties over for the copy method

Overrides:
copyProperties in class Group
Parameters:
component - base bean
See Also:
ComponentBase.copy()

copyNode

protected Node<Group,Message> copyNode(Node<Group,Message> node)
Copies a Node instance and then recursively copies each of its child nodes

Parameters:
node - node instance to copy
Returns:
new node instance copied from given node


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.