public abstract class AbstractTree extends UIDataAdaptor implements MetaComponentResolver, MetaComponentEncoder, TreeSelectionChangeSource, TreeToggleSource, AjaxProps, CoreProps, EventsKeyProps, EventsMouseProps, ImmediateProps, I18nProps, SequenceProps, TreeProps, TreeCommonProps
The <rich:tree> component provides a hierarchical tree control. Each <rich:tree> component typically consists of <rich:treeNode> child components. The appearance and behavior of the tree and its nodes can be fully customized.
UIDataAdaptor.ComponentVisitor
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
static String |
DEFAULT_TREE_NODE_FACET_NAME |
static String |
DEFAULT_TREE_NODE_ID |
static String |
SELECTION_META_COMPONENT_ID |
decodeVisitor, updateVisitor, validateVisitor
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
META_COMPONENT_SEPARATOR_CHAR
Constructor and Description |
---|
AbstractTree() |
Modifier and Type | Method and Description |
---|---|
void |
addTreeSelectionChangeListener(TreeSelectionChangeListener listener) |
void |
addTreeToggleListener(TreeToggleListener listener) |
void |
broadcast(javax.faces.event.FacesEvent event) |
DeclarativeModelKey |
convertDeclarativeKeyFromString(javax.faces.context.FacesContext context,
String modelId,
String modelKeyAsString) |
String |
convertDeclarativeKeyToString(javax.faces.context.FacesContext context,
DeclarativeModelKey declarativeKey) |
protected DataComponentState |
createComponentState() |
protected ExtendedDataModel<?> |
createExtendedDataModel() |
TreeDataModelTuple |
createSnapshot() |
protected Iterator<javax.faces.component.UIComponent> |
dataChildren() |
void |
encodeMetaComponent(javax.faces.context.FacesContext context,
String metaComponentId) |
protected javax.faces.component.UIComponent |
findDeclarativeModel(String modelId) |
protected Iterator<javax.faces.component.UIComponent> |
findMatchingTreeNodeComponent(String nodeType,
javax.faces.component.UIComponent parentComponent) |
AbstractTreeNode |
findTreeNodeComponent() |
String |
getFamily() |
abstract String |
getNodeClass()
Space-separated list of CSS style class(es) to be applied to the tree nodes.
|
abstract String |
getNodeType()
Determines which treeNode should be used for rendering.
|
abstract String |
getOnbeforenodetoggle()
The client-side script method to be called before the node is toggled.
|
abstract String |
getOnbeforeselectionchange()
The client-side script method to be called before the selection is changed.
|
abstract String |
getOnnodetoggle()
The client-side script method to be called after the node is toggled.
|
abstract String |
getOnselectionchange()
The client-side script method to be called after the selection is changed.
|
javax.faces.convert.Converter |
getRowKeyConverter()
Converter for a row key object
|
Collection<Object> |
getSelection()
The collections of selected nodes.
|
abstract SwitchType |
getSelectionType()
The type of type of the selection - ajax (default), client, server.
|
abstract String |
getToggleNodeEvent()
Client-side event used for toggling tree nodes (click, dblclick, etc.)
|
abstract SwitchType |
getToggleType()
The type of type of the node toggling - ajax (default), client, server.
|
protected TreeDataModel<?> |
getTreeDataModel() |
protected TreeRange |
getTreeRange() |
TreeSelectionChangeListener[] |
getTreeSelectionChangeListeners() |
TreeToggleListener[] |
getTreeToggleListeners() |
abstract Object |
getValue()
Points to the data model
|
boolean |
isExpanded() |
boolean |
isLeaf() |
void |
removeTreeSelectionChangeListener(TreeSelectionChangeListener listener) |
void |
removeTreeToggleListener(TreeToggleListener listener) |
protected void |
resetDataModel() |
String |
resolveClientId(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent contextComponent,
String metaComponentId)
Resolves and returns string identifying supported meta-component or
null if provided meta-component name is
not a supported one. |
protected void |
restoreChildState(javax.faces.context.FacesContext facesContext) |
void |
restoreFromSnapshot(javax.faces.context.FacesContext context,
TreeDataModelTuple tuple) |
void |
setSelection(Collection<Object> selection) |
protected void |
setupCurrentComponent() |
String |
substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent contextComponent,
String metaComponentId)
Provides replacement for unresolved meta-component names.
|
protected boolean |
visitFixedChildren(javax.faces.component.visit.VisitContext visitContext,
javax.faces.component.visit.VisitCallback callback) |
void |
walk(javax.faces.context.FacesContext faces,
DataVisitor visitor,
Object argument)
Walk ( visit ) this component on all data-aware children for each row.
|
void |
walkModel(javax.faces.context.FacesContext context,
TreeDataVisitor dataVisitor) |
allFixedChildren, captureOrigValue, clearExtendedDataModel, clearInitialState, createUniqueId, doUpdate, extractKeySegment, fixedChildren, getComponentState, getContainerClientId, getContainerClientId, getExtendedDataModel, getIterationState, getLocalComponentState, getRowCount, getRowData, getRowKey, getRowKeyVar, getStateVar, getVar, getVariablesMap, invokeOnComponent, invokeOnRow, isKeepSaved, isListenerForSource, isRowAvailable, iterate, keepSaved, markInitialState, preDecode, preEncodeBegin, preUpdate, preValidate, processDecodes, processDecodesChildren, processEvent, processEvent, processUpdates, processUpdatesChildren, processValidatesChildren, processValidators, queueEvent, resetChildState, restoreChildState, restoreOrigValue, restoreState, saveChildState, saveChildState, saveState, setExtendedDataModel, setId, setIterationState, setKeepSaved, setRowKey, setRowKey, setRowKeyConverter, setRowKeyVar, setStateVar, setupVariable, setValueExpression, setVar, visitDataChildren, visitDataChildrenMetaComponents, visitTree, wrapEvent
addClientBehavior, addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExecute, getOnbegin, getStatus
getData, getOnbeforedomupdate, getOncomplete, getRender, isLimitRender, isResetValues
getStyle, getStyleClass, getTitle
getOnkeydown, getOnkeypress, getOnkeyup
getOnclick, getOndblclick, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup
isImmediate
getRowKeyVar, getSelectionChangeListener, getStateVar, getVar, isKeepSaved
getHandleClass, getIconClass, getIconCollapsed, getIconExpanded, getIconLeaf, getLabelClass, getToggleListener
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public static final String SELECTION_META_COMPONENT_ID
public static final String DEFAULT_TREE_NODE_ID
public static final String DEFAULT_TREE_NODE_FACET_NAME
protected TreeRange getTreeRange()
public abstract Object getValue()
public abstract String getNodeClass()
TreeProps
getNodeClass
in interface TreeProps
public abstract String getOnnodetoggle()
TreeProps
getOnnodetoggle
in interface TreeProps
public abstract String getOnbeforenodetoggle()
TreeProps
getOnbeforenodetoggle
in interface TreeProps
public abstract String getOnselectionchange()
TreeProps
getOnselectionchange
in interface TreeProps
public abstract String getOnbeforeselectionchange()
TreeProps
getOnbeforeselectionchange
in interface TreeProps
public abstract SwitchType getToggleType()
TreeProps
getToggleType
in interface TreeProps
public abstract SwitchType getSelectionType()
TreeProps
getSelectionType
in interface TreeProps
public abstract String getNodeType()
TreeProps
getNodeType
in interface TreeProps
public abstract String getToggleNodeEvent()
TreeProps
getToggleNodeEvent
in interface TreeProps
public String getFamily()
getFamily
in class UIDataAdaptor
public Collection<Object> getSelection()
TreeProps
getSelection
in interface TreeProps
public void setSelection(Collection<Object> selection)
protected DataComponentState createComponentState()
createComponentState
in class UIDataAdaptor
public javax.faces.convert.Converter getRowKeyConverter()
SequenceProps
getRowKeyConverter
in interface SequenceProps
getRowKeyConverter
in class UIDataAdaptor
protected Iterator<javax.faces.component.UIComponent> findMatchingTreeNodeComponent(String nodeType, javax.faces.component.UIComponent parentComponent)
protected void setupCurrentComponent()
public AbstractTreeNode findTreeNodeComponent()
public void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException
broadcast
in class UIDataAdaptor
javax.faces.event.AbortProcessingException
protected boolean visitFixedChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)
visitFixedChildren
in class UIDataAdaptor
public void encodeMetaComponent(javax.faces.context.FacesContext context, String metaComponentId) throws IOException
encodeMetaComponent
in interface MetaComponentEncoder
IOException
public String resolveClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolver
null
if provided meta-component name is
not a supported one.resolveClientId
in interface MetaComponentResolver
facesContext
- - current instance of FacesContext
contextComponent
- - instance of UIComponent
that requested resolution of meta-componentmetaComponentId
- - name of meta-component (without leading '@' sign)null
public String substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolver
null
substituteUnresolvedClientId
in interface MetaComponentResolver
facesContext
- - current instance of FacesContext
contextComponent
- - instance of UIComponent
that requested resolution of meta-componentmetaComponentId
- - name of meta-component (without leading '@' sign)null
protected Iterator<javax.faces.component.UIComponent> dataChildren()
dataChildren
in class UIDataAdaptor
public void addTreeSelectionChangeListener(TreeSelectionChangeListener listener)
addTreeSelectionChangeListener
in interface TreeSelectionChangeSource
public TreeSelectionChangeListener[] getTreeSelectionChangeListeners()
public void removeTreeSelectionChangeListener(TreeSelectionChangeListener listener)
removeTreeSelectionChangeListener
in interface TreeSelectionChangeSource
public void addTreeToggleListener(TreeToggleListener listener)
addTreeToggleListener
in interface TreeToggleSource
public TreeToggleListener[] getTreeToggleListeners()
public void removeTreeToggleListener(TreeToggleListener listener)
removeTreeToggleListener
in interface TreeToggleSource
public boolean isExpanded()
protected TreeDataModel<?> getTreeDataModel()
public boolean isLeaf()
public void walk(javax.faces.context.FacesContext faces, DataVisitor visitor, Object argument)
UIDataAdaptor
walk
in class UIDataAdaptor
protected ExtendedDataModel<?> createExtendedDataModel()
createExtendedDataModel
in class UIDataAdaptor
public void walkModel(javax.faces.context.FacesContext context, TreeDataVisitor dataVisitor)
protected void resetDataModel()
resetDataModel
in class UIDataAdaptor
public TreeDataModelTuple createSnapshot()
public void restoreFromSnapshot(javax.faces.context.FacesContext context, TreeDataModelTuple tuple)
protected void restoreChildState(javax.faces.context.FacesContext facesContext)
restoreChildState
in class UIDataAdaptor
protected javax.faces.component.UIComponent findDeclarativeModel(String modelId)
public String convertDeclarativeKeyToString(javax.faces.context.FacesContext context, DeclarativeModelKey declarativeKey) throws javax.faces.convert.ConverterException
javax.faces.convert.ConverterException
public DeclarativeModelKey convertDeclarativeKeyFromString(javax.faces.context.FacesContext context, String modelId, String modelKeyAsString) throws javax.faces.convert.ConverterException
javax.faces.convert.ConverterException
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.