public class TreeNode extends TreeFamily
The <o:treeNode>
is an UIComponent
that represents a single tree node within a parent
Tree
component. Within this component, the var
attribute of the parent Tree
component will expose the tree node. Each of its children is processed by TreeNodeItem
.
The level
attribute can be used to specify for which tree node level as obtained by
TreeModel.getLevel()
this component should render the children by TreeNodeItem
. The root tree node
has level 0.
Tree
,
TreeNodeItem
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_TYPE
The standard component type.
|
COMPONENT_FAMILY
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
Constructor and Description |
---|
TreeNode() |
Modifier and Type | Method and Description |
---|---|
Integer |
getLevel()
Returns the level for which this node should render the items.
|
protected void |
process(FacesContext context,
PhaseId phaseId)
This method is by design only called by
Tree.processTreeNode(FacesContext, PhaseId) as it maintains all
the nodes. |
void |
setLevel(Integer level)
Sets the level for which this node should render the items.
|
protected void |
validateHierarchy()
Validate the component hierarchy.
|
encodeChildren, getFamily, getRendersChildren, processDecodes, processSuper, processUpdates, processValidators
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
public static final String COMPONENT_TYPE
protected void validateHierarchy()
validateHierarchy
in class TreeFamily
IllegalArgumentException
- When the direct parent component isn't of type Tree
.protected void process(FacesContext context, PhaseId phaseId)
Tree.processTreeNode(FacesContext, PhaseId)
as it maintains all
the nodes.process
in class TreeFamily
context
- The faces context to work with.phaseId
- The current phase ID.Tree.processTreeNode(FacesContext, PhaseId)
public Integer getLevel()
public void setLevel(Integer level)
level
- The level for which this node should render the items.Copyright © 2012–2015 OmniFaces. All rights reserved.