javax.faces.component
Class UINamingContainer

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UINamingContainer
All Implemented Interfaces:
EventListener, NamingContainer, PartialStateHolder, StateHolder, TransientStateHolder, UniqueIdVendor, ComponentSystemEventListener, FacesListener, SystemEventListenerHolder

@JSFComponent(name="f:subview",
              bodyContent="JSP",
              tagClass="org.apache.myfaces.taglib.core.SubviewTag")
@JSFJspProperty(name="id",
                required=true)
public class UINamingContainer
extends UIComponentBase
implements NamingContainer, UniqueIdVendor

Base class for components that provide a new "namespace" for the ids of their child components.

See the javadocs for interface NamingContainer for further details.


Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
static String SEPARATOR_CHAR_PARAM_NAME
           
 
Fields inherited from class javax.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
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
UINamingContainer()
          Construct an instance of the UINamingContainer.
 
Method Summary
 String createUniqueId(FacesContext context, String seed)
          
 String getFamily()
           
static char getSeparatorChar(FacesContext context)
           
 boolean isRendered()
          A boolean value that indicates whether this component should be rendered.
 boolean visitTree(VisitContext context, VisitCallback callback)
          The visit tree method, visit tree walks over a subtree and processes the callback object to perform some operation on the subtree
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, 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, getTransientStateHelper, getTransientStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
See Also:
Constant Field Values

SEPARATOR_CHAR_PARAM_NAME

public static final String SEPARATOR_CHAR_PARAM_NAME
See Also:
Constant Field Values
Constructor Detail

UINamingContainer

public UINamingContainer()
Construct an instance of the UINamingContainer.

Method Detail

getFamily

public String getFamily()
Specified by:
getFamily in class UIComponent

createUniqueId

public String createUniqueId(FacesContext context,
                             String seed)

Specified by:
createUniqueId in interface UniqueIdVendor
Since:
2.0

getSeparatorChar

public static char getSeparatorChar(FacesContext context)
Parameters:
context -
Returns:
Since:
2.0

isRendered

@JSFProperty(deferredValueType="java.lang.Boolean")
public boolean isRendered()
Description copied from class: UIComponentBase
A boolean value that indicates whether this component should be rendered. Default value: true.

Overrides:
isRendered in class UIComponentBase

visitTree

public boolean visitTree(VisitContext context,
                         VisitCallback callback)
Description copied from class: UIComponent
The visit tree method, visit tree walks over a subtree and processes the callback object to perform some operation on the subtree

there are some details in the implementation which according to the spec have to be in place: a) before calling the callback and traversing into the subtree pushComponentToEL has to be called b) after the processing popComponentFromEL has to be performed to remove the component from the el

The tree traversal optimizations are located in the visit context and can be replaced via the VisitContextFactory in the faces-config factory section

Overrides:
visitTree in class UIComponentBase
Parameters:
context - the visit context which handles the processing details
callback - the callback to be performed
Returns:
false if the processing is not done true if we can shortcut the visiting because we are done with everything


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.