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, validateVisitorATTRS_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_KEYMETA_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, wrapEventaddClientBehavior, 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, unsubscribeFromEventencodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInViewclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExecute, getOnbegin, getStatusgetData, getOnbeforedomupdate, getOncomplete, getRender, isLimitRender, isResetValuesgetStyle, getStyleClass, getTitlegetOnkeydown, getOnkeypress, getOnkeyupgetOnclick, getOndblclick, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseupisImmediategetRowKeyVar, getSelectionChangeListener, getStateVar, getToggleListener, getVar, isKeepSavedgetHandleClass, getIconClass, getIconCollapsed, getIconExpanded, getIconLeaf, getLabelClasspublic 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()
TreePropsgetNodeClass in interface TreePropspublic abstract String getOnnodetoggle()
TreePropsgetOnnodetoggle in interface TreePropspublic abstract String getOnbeforenodetoggle()
TreePropsgetOnbeforenodetoggle in interface TreePropspublic abstract String getOnselectionchange()
TreePropsgetOnselectionchange in interface TreePropspublic abstract String getOnbeforeselectionchange()
TreePropsgetOnbeforeselectionchange in interface TreePropspublic abstract SwitchType getToggleType()
TreePropsgetToggleType in interface TreePropspublic abstract SwitchType getSelectionType()
TreePropsgetSelectionType in interface TreePropspublic abstract String getNodeType()
TreePropsgetNodeType in interface TreePropspublic abstract String getToggleNodeEvent()
TreePropsgetToggleNodeEvent in interface TreePropspublic String getFamily()
getFamily in class UIDataAdaptorpublic Collection<Object> getSelection()
TreePropsgetSelection in interface TreePropspublic void setSelection(Collection<Object> selection)
protected DataComponentState createComponentState()
createComponentState in class UIDataAdaptorpublic javax.faces.convert.Converter getRowKeyConverter()
SequencePropsgetRowKeyConverter in interface SequencePropsgetRowKeyConverter in class UIDataAdaptorprotected 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 UIDataAdaptorjavax.faces.event.AbortProcessingExceptionprotected boolean visitFixedChildren(javax.faces.component.visit.VisitContext visitContext,
javax.faces.component.visit.VisitCallback callback)
visitFixedChildren in class UIDataAdaptorpublic void encodeMetaComponent(javax.faces.context.FacesContext context,
String metaComponentId)
throws IOException
encodeMetaComponent in interface MetaComponentEncoderIOExceptionpublic String resolveClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolvernull if provided meta-component name is
not a supported one.resolveClientId in interface MetaComponentResolverfacesContext - - current instance of FacesContextcontextComponent - - instance of UIComponent that requested resolution of meta-componentmetaComponentId - - name of meta-component (without leading '@' sign)nullpublic String substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolvernullsubstituteUnresolvedClientId in interface MetaComponentResolverfacesContext - - current instance of FacesContextcontextComponent - - instance of UIComponent that requested resolution of meta-componentmetaComponentId - - name of meta-component (without leading '@' sign)nullprotected Iterator<javax.faces.component.UIComponent> dataChildren()
dataChildren in class UIDataAdaptorpublic void addTreeSelectionChangeListener(TreeSelectionChangeListener listener)
addTreeSelectionChangeListener in interface TreeSelectionChangeSourcepublic TreeSelectionChangeListener[] getTreeSelectionChangeListeners()
public void removeTreeSelectionChangeListener(TreeSelectionChangeListener listener)
removeTreeSelectionChangeListener in interface TreeSelectionChangeSourcepublic void addTreeToggleListener(TreeToggleListener listener)
addTreeToggleListener in interface TreeToggleSourcepublic TreeToggleListener[] getTreeToggleListeners()
public void removeTreeToggleListener(TreeToggleListener listener)
removeTreeToggleListener in interface TreeToggleSourcepublic boolean isExpanded()
protected TreeDataModel<?> getTreeDataModel()
public boolean isLeaf()
public void walk(javax.faces.context.FacesContext faces,
DataVisitor visitor,
Object argument)
UIDataAdaptorwalk in class UIDataAdaptorprotected ExtendedDataModel<?> createExtendedDataModel()
createExtendedDataModel in class UIDataAdaptorpublic void walkModel(javax.faces.context.FacesContext context,
TreeDataVisitor dataVisitor)
protected void resetDataModel()
resetDataModel in class UIDataAdaptorpublic TreeDataModelTuple createSnapshot()
public void restoreFromSnapshot(javax.faces.context.FacesContext context,
TreeDataModelTuple tuple)
protected void restoreChildState(javax.faces.context.FacesContext facesContext)
restoreChildState in class UIDataAdaptorprotected 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.ConverterExceptionpublic DeclarativeModelKey convertDeclarativeKeyFromString(javax.faces.context.FacesContext context, String modelId, String modelKeyAsString) throws javax.faces.convert.ConverterException
javax.faces.convert.ConverterExceptionCopyright © 2014 JBoss by Red Hat. All Rights Reserved.