org.omnifaces.component.tree
Class TreeFamily

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.omnifaces.component.tree.TreeFamily
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
Direct Known Subclasses:
Tree, TreeInsertChildren, TreeNode, TreeNodeItem

public abstract class TreeFamily
extends javax.faces.component.UIComponentBase

Base class which is to be shared between all components of the Tree family.

Author:
Bauke Scholtz

Field Summary
static java.lang.String COMPONENT_FAMILY
          The standard component family.
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Constructor Summary
TreeFamily()
          The base constructor sets the renderer type to null as the components of the Tree family does not render anything by themselves.
 
Method Summary
 void encodeChildren(javax.faces.context.FacesContext context)
          Calls validateHierarchy() and then process(FacesContext, PhaseId) with PhaseId.RENDER_RESPONSE.
 java.lang.String getFamily()
          Returns COMPONENT_FAMILY.
 boolean getRendersChildren()
          Returns true.
protected abstract  void process(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
          Process the component according to the rules of the given phase ID.
 void processDecodes(javax.faces.context.FacesContext context)
          Calls validateHierarchy() and then process(FacesContext, PhaseId) with PhaseId.APPLY_REQUEST_VALUES.
protected  void processSuper(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
          Helper method to delegate the processing further to the UIComponentBase superclass which will handle all children.
 void processUpdates(javax.faces.context.FacesContext context)
          Calls process(FacesContext, PhaseId) with PhaseId.UPDATE_MODEL_VALUES.
 void processValidators(javax.faces.context.FacesContext context)
          Calls process(FacesContext, PhaseId) with PhaseId.PROCESS_VALIDATIONS.
protected abstract  void validateHierarchy()
          Validate the component hierarchy.
 
Methods inherited from class javax.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, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
The standard component family.

See Also:
Constant Field Values
Constructor Detail

TreeFamily

public TreeFamily()
The base constructor sets the renderer type to null as the components of the Tree family does not render anything by themselves.

Method Detail

getFamily

public java.lang.String getFamily()
Returns COMPONENT_FAMILY.

Specified by:
getFamily in class javax.faces.component.UIComponent

getRendersChildren

public boolean getRendersChildren()
Returns true.

Overrides:
getRendersChildren in class javax.faces.component.UIComponentBase

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Calls validateHierarchy() and then process(FacesContext, PhaseId) with PhaseId.APPLY_REQUEST_VALUES.

Overrides:
processDecodes in class javax.faces.component.UIComponentBase

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Calls process(FacesContext, PhaseId) with PhaseId.PROCESS_VALIDATIONS.

Overrides:
processValidators in class javax.faces.component.UIComponentBase

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
Calls process(FacesContext, PhaseId) with PhaseId.UPDATE_MODEL_VALUES.

Overrides:
processUpdates in class javax.faces.component.UIComponentBase

encodeChildren

public void encodeChildren(javax.faces.context.FacesContext context)
                    throws java.io.IOException
Calls validateHierarchy() and then process(FacesContext, PhaseId) with PhaseId.RENDER_RESPONSE.

Overrides:
encodeChildren in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

validateHierarchy

protected abstract void validateHierarchy()
                                   throws java.lang.IllegalArgumentException
Validate the component hierarchy.

Throws:
java.lang.IllegalArgumentException - When component hierarchy is wrong.

process

protected abstract void process(javax.faces.context.FacesContext context,
                                javax.faces.event.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(javax.faces.context.FacesContext context,
                            javax.faces.event.PhaseId phaseId)
Helper method to delegate the processing further to the UIComponentBase superclass which will handle all children.

Parameters:
context - The faces context to work with.
phaseId - The current phase ID.