- java.lang.Object
-
- jakarta.faces.component.UIComponent
-
- jakarta.faces.component.UIComponentBase
-
- org.omnifaces.component.tree.TreeFamily
-
- All Implemented Interfaces:
PartialStateHolder
,StateHolder
,TransientStateHolder
,ComponentSystemEventListener
,FacesListener
,SystemEventListenerHolder
,EventListener
- Direct Known Subclasses:
Tree
,TreeInsertChildren
,TreeNode
,TreeNodeItem
public abstract class TreeFamily extends UIComponentBase
Base class which is to be shared between all components of the Tree family.- Author:
- Bauke Scholtz
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_FAMILY
The standard component family.-
Fields inherited from class jakarta.faces.component.UIComponent
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 Summary
Constructors Modifier Constructor Description protected
TreeFamily()
The base constructor sets the renderer type tonull
as the components of the Tree family does not render anything by themselves.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
encodeChildren(FacesContext context)
CallsvalidateHierarchy()
when project stage isDevelopment
and then callsprocess(FacesContext, PhaseId)
withPhaseId.RENDER_RESPONSE
.String
getFamily()
ReturnsCOMPONENT_FAMILY
.boolean
getRendersChildren()
Returnstrue
.protected abstract void
process(FacesContext context, PhaseId phaseId)
Process the component according to the rules of the given phase ID.void
processDecodes(FacesContext context)
protected void
processSuper(FacesContext context, PhaseId phaseId)
Helper method to delegate the processing further to theUIComponentBase
superclass which will handle all children.void
processUpdates(FacesContext context)
void
processValidators(FacesContext context)
protected abstract void
validateHierarchy()
Validate the component hierarchy.-
Methods 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, 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
-
Methods inherited from class jakarta.faces.component.UIComponent
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
-
-
-
-
Field Detail
-
COMPONENT_FAMILY
public static final String COMPONENT_FAMILY
The standard component family.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFamily
public String getFamily()
ReturnsCOMPONENT_FAMILY
.- Specified by:
getFamily
in classUIComponent
-
getRendersChildren
public boolean getRendersChildren()
Returnstrue
.- Overrides:
getRendersChildren
in classUIComponentBase
-
processDecodes
public void processDecodes(FacesContext context)
- Overrides:
processDecodes
in classUIComponentBase
-
processValidators
public void processValidators(FacesContext context)
- Overrides:
processValidators
in classUIComponentBase
-
processUpdates
public void processUpdates(FacesContext context)
- Overrides:
processUpdates
in classUIComponentBase
-
encodeChildren
public void encodeChildren(FacesContext context) throws IOException
CallsvalidateHierarchy()
when project stage isDevelopment
and then callsprocess(FacesContext, PhaseId)
withPhaseId.RENDER_RESPONSE
.- Overrides:
encodeChildren
in classUIComponentBase
- Throws:
IOException
-
validateHierarchy
protected abstract void validateHierarchy()
Validate the component hierarchy. This should only be called when project stage isDevelopment
.- Throws:
IllegalStateException
- When component hierarchy is wrong.
-
process
protected abstract void process(FacesContext context, PhaseId phaseId)
Process the component according to the rules of the given phase ID.- Parameters:
context
- The faces context to work with.phaseId
- The current phase ID.
-
processSuper
protected void processSuper(FacesContext context, PhaseId phaseId)
Helper method to delegate the processing further to theUIComponentBase
superclass which will handle all children.- Parameters:
context
- The faces context to work with.phaseId
- The current phase ID.
-
-