org.apache.myfaces.trinidad.component
Class UIXNavigationTree

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by org.apache.myfaces.trinidad.component.UIXCollection
                  extended by org.apache.myfaces.trinidad.component.UIXHierarchy
                      extended by org.apache.myfaces.trinidad.component.UIXNavigationHierarchy
                          extended by org.apache.myfaces.trinidad.component.UIXNavigationTree
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder, CollectionComponent, RowKeyIndex
Direct Known Subclasses:
CoreNavigationTree

public class UIXNavigationTree
extends UIXNavigationHierarchy

Apache Trinidad navigationTree components are used to display hierarchical navigation data.

Events:

Type Phases Description
org.apache.myfaces.trinidad.event.RowDisclosureEvent Apply Request Values
Invoke Application
The expansion event is generated for a table when the detail facet of a row is expanded or collapsed. For tree or a treeTable, the expansion event is generated when tree nodes are expanded or collapsed.
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke Application
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static PropertyKey DISCLOSED_ROW_KEYS_KEY
           
static PropertyKey IMMEDIATE_KEY
           
static java.lang.String NODE_STAMP_FACET
           
static PropertyKey ROW_DISCLOSURE_LISTENER_KEY
           
static PropertyKey START_LEVEL_KEY
           
static FacesBean.Type TYPE
           
static PropertyKey VALUE_KEY
           
static PropertyKey VAR_STATUS_KEY
           
 
Fields inherited from class org.apache.myfaces.trinidad.component.UIXCollection
VAR_KEY
 
Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
  UIXNavigationTree()
          Construct an instance of the UIXNavigationTree.
protected UIXNavigationTree(java.lang.String rendererType)
          Construct an instance of the UIXNavigationTree.
 
Method Summary
 void addRowDisclosureListener(RowDisclosureListener listener)
          Adds a rowDisclosure listener.
 void broadcast(javax.faces.event.FacesEvent event)
          Delivers an event.
 CollectionModel createCollectionModel(CollectionModel current, java.lang.Object value)
          Creates the CollectionModel to use with this component.
protected  FacesBean.Type getBeanType()
           
 RowKeySet getDisclosedRowKeys()
          Gets the set of disclosed rows for this component.
 java.lang.String getFamily()
           
 javax.faces.component.UIComponent getNodeStamp()
          the component to use to stamp each element in the tree.
 javax.faces.el.MethodBinding getRowDisclosureListener()
          Gets a method reference to an ExpansionListener
 RowDisclosureListener[] getRowDisclosureListeners()
          Returns an array of attached rowDisclosure listeners.
 int getStartLevel()
          Gets the starting level, based on a 0 based index, in the menuModel to render based on the focusPath of the menuModel.
 java.lang.Object getValue()
          Gets the hierarchy of tree data - must be of type org.apache.myfaces.trinidad.model.MenuModel
 java.lang.String getVarStatus()
          Gets Name of the EL variable used to reference the varStatus information.
 boolean isImmediate()
          Gets whether data validation should be skipped when row disclosure events are generated by this component.
protected  void processFacetsAndChildren(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
          Process this component's facets and children.
 void queueEvent(javax.faces.event.FacesEvent event)
          Sets the phaseID of UI events depending on the "immediate" property.
 void removeRowDisclosureListener(RowDisclosureListener listener)
          Removes a rowDisclosure listener.
 void setDisclosedRowKeys(RowKeySet disclosedRowKeys)
          Sets the set of disclosed rows for this component.
 void setImmediate(boolean immediate)
          Sets whether data validation should be skipped when row disclosure events are generated by this component.
 void setNodeStamp(javax.faces.component.UIComponent nodeStampFacet)
          the component to use to stamp each element in the tree.
 void setRowDisclosureListener(javax.faces.el.MethodBinding rowDisclosureListener)
          Sets a method reference to an ExpansionListener
 void setStartLevel(int startLevel)
          Sets the starting level, based on a 0 based index, in the menuModel to render based on the focusPath of the menuModel.
 void setValue(java.lang.Object value)
          Sets the hierarchy of tree data - must be of type org.apache.myfaces.trinidad.model.MenuModel
 void setVarStatus(java.lang.String varStatus)
          Sets Name of the EL variable used to reference the varStatus information.
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXNavigationHierarchy
getFocusRowKey, getMenuModel
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXHierarchy
enterContainer, exitContainer, getAllAncestorContainerRowKeys, getContainerRowKey, getContainerRowKey, getDepth, getDepth, getFirst, getRows, getStamps, getTreeModel, isContainer, isContainerEmpty
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXCollection
clearCurrencyStringCache, createVarStatusMap, decodeChildrenImpl, encodeBegin, encodeEnd, getClientRowKey, getClientRowKeyManager, getCollectionModel, getCollectionModel, getCurrencyString, getLocalClientId, getRowCount, getRowData, getRowData, getRowIndex, getRowKey, getSortCriteria, getVar, isRowAvailable, isRowAvailable, isSortable, postRowDataChange, preRowDataChange, processComponent, processDecodes, processSaveState, resetStampState, restoreStampState, restoreState, saveStampState, saveState, setClientRowKey, setCurrencyString, setRowIndex, setRowKey, setSortCriteria, setVar, updateChildrenImpl, validateChildrenImpl
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, createFacesBean, decode, decodeChildren, encodeAll, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, markInitialState, processRestoreState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, toString, updateChildren, validateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.trinidad.component.CollectionComponent
getVar
 
Methods inherited from interface org.apache.myfaces.trinidad.model.RowKeyIndex
getRowCount, getRowData, getRowData, getRowIndex, getRowKey, isRowAvailable, isRowAvailable, setRowIndex, setRowKey
 

Field Detail

TYPE

public static final FacesBean.Type TYPE

ROW_DISCLOSURE_LISTENER_KEY

public static final PropertyKey ROW_DISCLOSURE_LISTENER_KEY

DISCLOSED_ROW_KEYS_KEY

public static final PropertyKey DISCLOSED_ROW_KEYS_KEY

VALUE_KEY

public static final PropertyKey VALUE_KEY

START_LEVEL_KEY

public static final PropertyKey START_LEVEL_KEY

VAR_STATUS_KEY

public static final PropertyKey VAR_STATUS_KEY

IMMEDIATE_KEY

public static final PropertyKey IMMEDIATE_KEY

NODE_STAMP_FACET

public static final java.lang.String NODE_STAMP_FACET
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

UIXNavigationTree

public UIXNavigationTree()
Construct an instance of the UIXNavigationTree.


UIXNavigationTree

protected UIXNavigationTree(java.lang.String rendererType)
Construct an instance of the UIXNavigationTree.

Method Detail

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Sets the phaseID of UI events depending on the "immediate" property.

Overrides:
queueEvent in class UIXCollection
Parameters:
event - a FacesEvent

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Delivers an event.

Overrides:
broadcast in class UIXCollection
Parameters:
event -
Throws:
javax.faces.event.AbortProcessingException

createCollectionModel

public CollectionModel createCollectionModel(CollectionModel current,
                                             java.lang.Object value)
Description copied from class: UIXCollection
Creates the CollectionModel to use with this component.

Overrides:
createCollectionModel in class UIXNavigationHierarchy
Parameters:
current - the current CollectionModel, or null if there is none.
value - this is the value returned from UIXCollection.getValue()

processFacetsAndChildren

protected void processFacetsAndChildren(javax.faces.context.FacesContext context,
                                        javax.faces.event.PhaseId phaseId)
Description copied from class: UIXCollection
Process this component's facets and children. This method should call UIXCollection.processComponent(javax.faces.context.FacesContext, javax.faces.component.UIComponent, javax.faces.event.PhaseId) as many times as necessary for each facet and child. UIXCollection.processComponent(javax.faces.context.FacesContext, javax.faces.component.UIComponent, javax.faces.event.PhaseId) may be called repeatedly for the same child if that child is being stamped.

Specified by:
processFacetsAndChildren in class UIXCollection

getNodeStamp

public final javax.faces.component.UIComponent getNodeStamp()
the component to use to stamp each element in the tree. Only certain types of components are supported, including all components with no behavior and most components that implement the EditableValueHolder or ActionSource interfaces.


setNodeStamp

public final void setNodeStamp(javax.faces.component.UIComponent nodeStampFacet)
the component to use to stamp each element in the tree. Only certain types of components are supported, including all components with no behavior and most components that implement the EditableValueHolder or ActionSource interfaces.


getRowDisclosureListener

public final javax.faces.el.MethodBinding getRowDisclosureListener()
Gets a method reference to an ExpansionListener

Returns:
the new rowDisclosureListener value

setRowDisclosureListener

public final void setRowDisclosureListener(javax.faces.el.MethodBinding rowDisclosureListener)
Sets a method reference to an ExpansionListener

Parameters:
rowDisclosureListener - the new rowDisclosureListener value

getDisclosedRowKeys

public final RowKeySet getDisclosedRowKeys()
Gets the set of disclosed rows for this component. Each entry in the set is a rowKey.

Returns:
the new disclosedRowKeys value

setDisclosedRowKeys

public final void setDisclosedRowKeys(RowKeySet disclosedRowKeys)
Sets the set of disclosed rows for this component. Each entry in the set is a rowKey.

Parameters:
disclosedRowKeys - the new disclosedRowKeys value

getValue

public final java.lang.Object getValue()
Gets the hierarchy of tree data - must be of type org.apache.myfaces.trinidad.model.MenuModel

This is a required property on the component.

Specified by:
getValue in class UIXCollection
Returns:
the new value value

setValue

public final void setValue(java.lang.Object value)
Sets the hierarchy of tree data - must be of type org.apache.myfaces.trinidad.model.MenuModel

This is a required property on the component.

Parameters:
value - the new value value

getStartLevel

public final int getStartLevel()
Gets the starting level, based on a 0 based index, in the menuModel to render based on the focusPath of the menuModel.

Returns:
the new startLevel value

setStartLevel

public final void setStartLevel(int startLevel)
Sets the starting level, based on a 0 based index, in the menuModel to render based on the focusPath of the menuModel.

Parameters:
startLevel - the new startLevel value

getVarStatus

public final java.lang.String getVarStatus()
Gets Name of the EL variable used to reference the varStatus information. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). The VarStatus provides contextual information about the state of the component to EL expressions. For components that iterate, varStatus also provides loop counter information. Please see the this component's documentation for the specific properties on the varStatus. The common properties on varStatus include:

Specified by:
getVarStatus in class UIXCollection
Returns:
the new varStatus value
See Also:
UIXCollection.createVarStatusMap()

setVarStatus

public final void setVarStatus(java.lang.String varStatus)
Sets Name of the EL variable used to reference the varStatus information. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). The VarStatus provides contextual information about the state of the component to EL expressions. For components that iterate, varStatus also provides loop counter information. Please see the this component's documentation for the specific properties on the varStatus. The common properties on varStatus include:

Parameters:
varStatus - the new varStatus value

isImmediate

public final boolean isImmediate()
Gets whether data validation should be skipped when row disclosure events are generated by this component. When immediate is false (the default), events will be delivered during the Invoke Application phase, which will trigger validation. When set to true, events will be executed during the Apply Request Values phase.

Returns:
the new immediate value

setImmediate

public final void setImmediate(boolean immediate)
Sets whether data validation should be skipped when row disclosure events are generated by this component. When immediate is false (the default), events will be delivered during the Invoke Application phase, which will trigger validation. When set to true, events will be executed during the Apply Request Values phase.

Parameters:
immediate - the new immediate value

addRowDisclosureListener

public final void addRowDisclosureListener(RowDisclosureListener listener)
Adds a rowDisclosure listener.

Parameters:
listener - the rowDisclosure listener to add

removeRowDisclosureListener

public final void removeRowDisclosureListener(RowDisclosureListener listener)
Removes a rowDisclosure listener.

Parameters:
listener - the rowDisclosure listener to remove

getRowDisclosureListeners

public final RowDisclosureListener[] getRowDisclosureListeners()
Returns an array of attached rowDisclosure listeners.

Returns:
an array of attached rowDisclosure listeners.

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class UIXComponentBase

getBeanType

protected FacesBean.Type getBeanType()
Overrides:
getBeanType in class UIXComponentBase


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.