java.lang.Object
jakarta.faces.component.UIComponent
jakarta.faces.component.UIComponentBase
org.omnifaces.component.tree.TreeFamily
org.omnifaces.component.tree.TreeNodeItem
- All Implemented Interfaces:
PartialStateHolder,StateHolder,TransientStateHolder,ComponentSystemEventListener,FacesListener,SystemEventListenerHolder,EventListener
The <o:treeNodeItem> is an UIComponent that represents a single child tree node within a
parent TreeNode component. Within this component, the var attribute of the parent Tree
component will expose the child tree node.
This component allows a child component of type TreeInsertChildren which indicates the place to insert
the children of the current child tree node recursively by a TreeNode component associated with the
children's level in the same parent Tree component.
- Author:
- Bauke Scholtz
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe component type, which is "org.omnifaces.component.tree.TreeNodeItem".Fields inherited from class org.omnifaces.component.tree.TreeFamily
COMPONENT_FAMILYFields inherited from class jakarta.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, FACETS_KEY, VIEW_LOCATION_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencodeAll(FacesContext context) Suppress default behavior ofencodeAll(FacesContext)(which also checksUIComponentBase.isRendered()) by delegating directly toTreeFamily.encodeChildren(FacesContext).protected voidprocess(FacesContext context, PhaseId phaseId) Loop over children of the current model node, set the child as the current model node and continue processing this component according to the rules of the given phase ID.protected voidvalidateHierarchy(FacesContext context) Validate the component hierarchy.booleanvisitTree(VisitContext context, VisitCallback callback) Loop over children of the current model node, set the child as the current model node and continue visiting this component according to the given visit context and callback.Methods inherited from class org.omnifaces.component.tree.TreeFamily
encodeChildren, getFamily, getRendersChildren, processDecodes, processSuper, processUpdates, processValidatorsMethods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getPassThroughAttributes, getRenderer, getRendererType, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransientMethods inherited from class jakarta.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
-
Field Details
-
COMPONENT_TYPE
The component type, which is "org.omnifaces.component.tree.TreeNodeItem".- See Also:
-
-
Constructor Details
-
TreeNodeItem
public TreeNodeItem()
-
-
Method Details
-
validateHierarchy
Validate the component hierarchy.- Specified by:
validateHierarchyin classTreeFamily- Parameters:
context- The faces context to work with.- Throws:
IllegalStateException- When there is no parent of typeTreeNode, or when this component is nested in anotherTreeNodeItem.
-
encodeAll
Suppress default behavior ofencodeAll(FacesContext)(which also checksUIComponentBase.isRendered()) by delegating directly toTreeFamily.encodeChildren(FacesContext).- Overrides:
encodeAllin classUIComponentBase- Throws:
IOException
-
process
Loop over children of the current model node, set the child as the current model node and continue processing this component according to the rules of the given phase ID.- Specified by:
processin classTreeFamily- Parameters:
context- The faces context to work with.phaseId- The current phase ID.- See Also:
-
visitTree
Loop over children of the current model node, set the child as the current model node and continue visiting this component according to the given visit context and callback.- Overrides:
visitTreein classUIComponentBase- Parameters:
context- The visit context to work with.callback- The visit callback to work with.- See Also:
-