public abstract class AbstractTree extends UIDataAdaptor implements MetaComponentResolver, MetaComponentEncoder, TreeSelectionChangeSource, TreeToggleSource
The <r:tree> component provides a hierarchical tree control. Each <r:tree> component typically consists of <r: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() |
abstract String |
getNodeType() |
abstract String |
getOnbeforenodetoggle() |
abstract String |
getOnbeforeselectionchange() |
abstract String |
getOnnodetoggle() |
abstract String |
getOnselectionchange() |
javax.faces.convert.Converter |
getRowKeyConverter() |
Collection<Object> |
getSelection() |
abstract SwitchType |
getSelectionType() |
abstract String |
getToggleNodeEvent() |
abstract SwitchType |
getToggleType() |
protected TreeDataModel<?> |
getTreeDataModel() |
protected TreeRange |
getTreeRange() |
TreeSelectionChangeListener[] |
getTreeSelectionChangeListeners() |
TreeToggleListener[] |
getTreeToggleListeners() |
abstract Object |
getValue() |
boolean |
isExpanded() |
abstract boolean |
isImmediate() |
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, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView
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 boolean isImmediate()
public abstract String getNodeClass()
public abstract String getOnnodetoggle()
public abstract String getOnbeforenodetoggle()
public abstract String getOnselectionchange()
public abstract String getOnbeforeselectionchange()
public abstract SwitchType getToggleType()
public abstract SwitchType getSelectionType()
public abstract String getNodeType()
public abstract String getToggleNodeEvent()
public String getFamily()
getFamily
in class UIDataAdaptor
public Collection<Object> getSelection()
public void setSelection(Collection<Object> selection)
protected DataComponentState createComponentState()
createComponentState
in class UIDataAdaptor
public javax.faces.convert.Converter getRowKeyConverter()
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 © 2013 JBoss by Red Hat. All Rights Reserved.