org.apache.myfaces.trinidad.component
Class UIXComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
All Implemented Interfaces:
EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
Direct Known Subclasses:
UIXComponentBase

@JSFComponent
public abstract class UIXComponent
extends javax.faces.component.UIComponent

Pure abstract base class for all UIX components.


Field Summary
 
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
UIXComponent()
           
 
Method Summary
abstract  void addAttributeChangeListener(AttributeChangeListener acl)
          Adds an AttributeChangeListener.
static void addPartialTarget(javax.faces.context.FacesContext facesContext, PartialPageContext partialContext, javax.faces.component.UIComponent component)
          Add a component as a partial target to the current request.
 void clearCachedClientIds()
          Clears all of the cached clientIds in this component subtree
static void clearCachedClientIds(javax.faces.component.UIComponent component)
          Clears all of the cached clientIds in the component's subtree
static
<S> boolean
encodeFlattenedChild(javax.faces.context.FacesContext context, ComponentProcessor<S> childProcessor, javax.faces.component.UIComponent child, S callbackContext)
          Helper function called by Renderers to encode a flattened view of a group of potentially FlattenedComponent instances rooted at a single child of the component, invoking the childProcessor with its callbackContext on each renderable instance.
static
<S> boolean
encodeFlattenedChildren(javax.faces.context.FacesContext context, ComponentProcessor<S> childProcessor, Iterable<javax.faces.component.UIComponent> children, S callbackContext)
          Helper function called by Renderers to encode a flattened view of their children, invoking the childProcessor with its callbackContext on each renderable instance.
abstract  javax.el.MethodExpression getAttributeChangeListener()
          Gets the method binding to an AttributeChangeListener.
abstract  AttributeChangeListener[] getAttributeChangeListeners()
          Gets the registered AttributeChangeListeners.
abstract  String getContainerClientId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent child)
          Provides additional context (the target child component for which the container client ID is requested) to a naming container for constructing a client ID.
abstract  FacesBean getFacesBean()
          Returns the FacesBean used for storing the component's state.
 javax.faces.component.UIComponent getLogicalParent()
          Provides a logical parent for this component (a parent in the context of the document where this component was defined).
static javax.faces.component.UIComponent getLogicalParent(javax.faces.component.UIComponent component)
          Provides a logical parent for the component (a parent in the context of the document where the component was defined).
protected  Iterator<javax.faces.component.UIComponent> getRenderedFacetsAndChildren(javax.faces.context.FacesContext facesContext)
          Specifies what facets and children components should be processed as rendered for life-cycle methods.
protected  javax.faces.component.StateHelper getStateHelper()
          We are using FacesBean to save state, which does not implement StateHelper, so calling this method will call UnsupportedOperationException
protected  javax.faces.component.StateHelper getStateHelper(boolean create)
          We are using FacesBean to save state, which does not implement StateHelper, so calling this method will call UnsupportedOperationException
protected  boolean isVisitable(javax.faces.component.visit.VisitContext visitContext)
          Called by UIXComponent.visitTree()to determine whether this component is "visitable" - ie.
abstract  void markInitialState()
           
 javax.faces.component.visit.VisitResult partialEncodeVisit(javax.faces.component.visit.VisitContext visitContext, PartialPageContext partialContext, javax.faces.component.visit.VisitCallback callback)
           Called when visiting the component during optimized partial page encoding so that the component can modify what is actually encoded.
static
<S> boolean
processFlattenedChildren(javax.faces.context.FacesContext context, ComponentProcessingContext cpContext, ComponentProcessor<S> childProcessor, Iterable<javax.faces.component.UIComponent> children, S callbackContext)
          Helper function called by FlattenedComponents to iterate over a flattened view of their children, potentially themselves FlattenedComponents, invoking the childProcessor with its callbackContext on each renderable instance.
static
<S> boolean
processFlattenedChildren(javax.faces.context.FacesContext context, ComponentProcessingContext cpContext, ComponentProcessor<S> childProcessor, javax.faces.component.UIComponent child, S callbackContext)
          Helper function called by FlattenedComponent to iterate over a flattened view of a group of potentially FlattenedComponent instances rooted at a single child of the FlattenedComponent, invoking the childProcessor with its callbackContext on each renderable instance.
static
<S> boolean
processFlattenedChildren(javax.faces.context.FacesContext context, ComponentProcessor<S> childProcessor, Iterable<javax.faces.component.UIComponent> children, S callbackContext)
          Helper function called by Renderers to iterate over a flattened view of the children, potentially containing FlattenedComponents, of the component the Renderer is encoding, invoking the childProcessor with its callbackContext on each renderable instance.
static
<S> boolean
processFlattenedChildren(javax.faces.context.FacesContext context, ComponentProcessor<S> childProcessor, javax.faces.component.UIComponent child, S callbackContext)
          Helper function called by Renderers to iterate over a flattened view of a group of potentially FlattenedComponent instances rooted at a single child of the component to collect information about these children prior to encoding the children using encodeFlattenedChild(FacesContext, ComponentProcessor, UIComponent, Object).
abstract  void removeAttributeChangeListener(AttributeChangeListener acl)
          Removes an AttributeChangeListener.
abstract  void setAttributeChangeListener(javax.el.MethodExpression me)
          Sets a method binding to an AttributeChangeListener.
protected  void setPartialTarget(javax.faces.context.FacesContext facesContext, PartialPageContext partialContext)
          Marks this component as a partial target for this request.
 void setupChildrenEncodingContext(javax.faces.context.FacesContext context, RenderingContext rc)
          Sets the context necessary to encode the children of a component.
protected  void setupChildrenVisitingContext(javax.faces.context.FacesContext context)
          Sets up the context necessary to visit or invoke the children of a component for all phases.
protected  void setupEncodingContext(javax.faces.context.FacesContext context, RenderingContext rc)
          Sets up the context necessary to encode the component.
protected  void setUpEncodingContext(javax.faces.context.FacesContext context, RenderingContext rc)
          Deprecated. 
protected  void setupVisitingContext(javax.faces.context.FacesContext context)
          Sets up the context necessary to visit or invoke the component for all phases.
 void tearDownChildrenEncodingContext(javax.faces.context.FacesContext context, RenderingContext rc)
          Tears down the context necessary to encode the children of a component.
protected  void tearDownChildrenVisitingContext(javax.faces.context.FacesContext context)
          Tears down context created in order to visit or invoke the children of a component for all phases.
protected  void tearDownEncodingContext(javax.faces.context.FacesContext context, RenderingContext rc)
          Tears down the context created in order to encode the component
protected  void tearDownVisitingContext(javax.faces.context.FacesContext context)
          Tears down context created in order to visit or invoke the component for all phases.
protected  boolean visitAllChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)
          Default implementation of visiting children that visits all children without iterating
static boolean visitChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.UIComponent parentComponent, javax.faces.component.visit.VisitCallback callback)
          Utility method to allow the visiting of children components while visiting a parent using a new visit callback or visit context.
protected  boolean visitChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)
          Hook for subclasses to override the manner in which the component's children are visited.
static boolean visitTree(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.UIComponent component, javax.faces.component.visit.VisitCallback callback)
          Perform a tree visit starting at the specified node in the tree.
 boolean visitTree(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)
          Perform a tree visit starting at this node in the tree.
 
Methods inherited from class javax.faces.component.UIComponent
addFacesListener, broadcast, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getFamily, getId, getListenersForEventClass, getNamingContainer, getParent, getRenderer, getRendererType, getRendersChildren, getResourceBundleMap, getValueBinding, getValueExpression, initialStateMarked, invokeOnComponent, isCompositeComponent, isInView, isRendered, popComponentFromEL, processDecodes, processEvent, processRestoreState, processSaveState, processUpdates, processValidators, pushComponentToEL, queueEvent, removeFacesListener, setId, setInView, setParent, setRendered, setRendererType, setValueBinding, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.StateHolder
isTransient, restoreState, saveState, setTransient
 

Constructor Detail

UIXComponent

public UIXComponent()
Method Detail

processFlattenedChildren

public static <S> boolean processFlattenedChildren(javax.faces.context.FacesContext context,
                                                   ComponentProcessor<S> childProcessor,
                                                   javax.faces.component.UIComponent child,
                                                   S callbackContext)
                                        throws IOException
Helper function called by Renderers to iterate over a flattened view of a group of potentially FlattenedComponent instances rooted at a single child of the component to collect information about these children prior to encoding the children using encodeFlattenedChild(FacesContext, ComponentProcessor, UIComponent, Object).

If the child is a FlattenedComponent, the childProcessor will be called on each of that FlattenedComponent's children, recursing if those children are themselves FlattenedComponents, otherwise, the childProcessor will be called on the child itself.

If the Renderer accidentally passes in the component to be processed instead of one of its children, the result will almost certainly be an infinite recursion and stack overflow.

Throws:
IOException
See Also:
processFlattenedChildren(FacesContext, ComponentProcessor, Iterable, Object), processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, UIComponent, Object), processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, Iterable, Object), FlattenedComponent

encodeFlattenedChild

public static <S> boolean encodeFlattenedChild(javax.faces.context.FacesContext context,
                                               ComponentProcessor<S> childProcessor,
                                               javax.faces.component.UIComponent child,
                                               S callbackContext)
                                    throws IOException
Helper function called by Renderers to encode a flattened view of a group of potentially FlattenedComponent instances rooted at a single child of the component, invoking the childProcessor with its callbackContext on each renderable instance. This method must be called when the childProcessor is actually encoding and the childProcessor must not attempt to encode the same component instances more than once per request.

If a Renderer needs to collect information about its possibly flattened children before calling encodeFlattenedChild(FacesContext, ComponentProcessor, UIComponent, Object), it should call processFlattenedChildren(FacesContext, ComponentProcessor, UIComponent, Object) to collect the information.

If the child is a FlattenedComponent, the childProcessor will be called on each of that FlattenedComponent's children, recursing if those children are themselves FlattenedComponents, otherwise, the childProcessor will be called on the child itself.

FlattenedComponents that wish to check whether they are processed for the purpose of encoding can check the ProcessingHints of the ComponentProcessingContext for the presence of PROCESS_FOR_ENCODING hint.

If the Renderer accidentally passes in the component to be encoded instead of one of its children, the result will almost certainly be an infinite recursion and stack overflow.

Returns:
true If any children were processed
Throws:
IOException
See Also:
processFlattenedChildren(FacesContext, ComponentProcessor, UIComponent, Object), FlattenedComponent

processFlattenedChildren

public static <S> boolean processFlattenedChildren(javax.faces.context.FacesContext context,
                                                   ComponentProcessingContext cpContext,
                                                   ComponentProcessor<S> childProcessor,
                                                   javax.faces.component.UIComponent child,
                                                   S callbackContext)
                                        throws IOException
Helper function called by FlattenedComponent to iterate over a flattened view of a group of potentially FlattenedComponent instances rooted at a single child of the FlattenedComponent, invoking the childProcessor with its callbackContext on each renderable instance.

If the child is a FlattenedComponent, the childProcessor will be called on each of that FlattenedComponent's children, recursing if those children are themselves FlattenedComponents, otherwise, the childProcessor will be called on the child itself.

This method is typically used to flatten the contents of a facet of the FlattenedComponent. If the FlattenedComponent accidentally passes in itself instead of one of its children, the result will almost certainly be an infinite recursion and stack overflow.

Returns:
true If any children were processed
Throws:
IOException
See Also:
processFlattenedChildren(FacesContext, ComponentProcessor, UIComponent, Object), processFlattenedChildren(FacesContext, ComponentProcessor, Iterable, Object), processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, Iterable, Object), FlattenedComponent

processFlattenedChildren

public static <S> boolean processFlattenedChildren(javax.faces.context.FacesContext context,
                                                   ComponentProcessor<S> childProcessor,
                                                   Iterable<javax.faces.component.UIComponent> children,
                                                   S callbackContext)
                                        throws IOException
Helper function called by Renderers to iterate over a flattened view of the children, potentially containing FlattenedComponents, of the component the Renderer is encoding, invoking the childProcessor with its callbackContext on each renderable instance.

For each FlattenedComponent child, the childProcessor will be called on each of that FlattenedComponent's children, recursing if those children are themselves FlattenedComponents, otherwise, the childProcessor will be called on the child itself.

This method is typically used to flatten the children of the FlattenedComponent to be encoded.

Returns:
true If any children were processed
Throws:
IOException
See Also:
processFlattenedChildren(FacesContext, ComponentProcessor, UIComponent, Object), processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, UIComponent, Object), processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, Iterable, Object), FlattenedComponent

encodeFlattenedChildren

public static <S> boolean encodeFlattenedChildren(javax.faces.context.FacesContext context,
                                                  ComponentProcessor<S> childProcessor,
                                                  Iterable<javax.faces.component.UIComponent> children,
                                                  S callbackContext)
                                       throws IOException
Helper function called by Renderers to encode a flattened view of their children, invoking the childProcessor with its callbackContext on each renderable instance. This method must be called when the childProcessor is actually encoding and the childProcessor must not attempt to encode the same component instances more than once per request.

If a Renderer needs to collect information about its possibly flattened children before calling encodeFlattenedChild(FacesContext, ComponentProcessor, Iterable<UIComponent>, Object), it should call processFlattenedChildren(FacesContext, ComponentProcessor, Iterable<UIComponent>, Object) to collect the information.

For each FlattenedComponent child, the childProcessor will be called on each of that FlattenedComponent's children, recursing if those children are themselves FlattenedComponents, otherwise, the childProcessor will be called on the child itself.

FlattenedComponents that wish to check whether they are processed for the purpose of encoding can check the ProcessingHints of the ComponentProcessingContext for the presence of PROCESS_FOR_ENCODING hint.

Parameters:
context - FacesContext
childProcessor - ComponentProcessor to call on each flattened child
children - Initial set of children to flatten
callbackContext - context object to pass to the childProcessor on each invocation
Returns:
true If any children were processed
Throws:
IOException
See Also:
processFlattenedChildren(FacesContext, ComponentProcessor, Iterable, Object), FlattenedComponent

processFlattenedChildren

public static <S> boolean processFlattenedChildren(javax.faces.context.FacesContext context,
                                                   ComponentProcessingContext cpContext,
                                                   ComponentProcessor<S> childProcessor,
                                                   Iterable<javax.faces.component.UIComponent> children,
                                                   S callbackContext)
                                        throws IOException
Helper function called by FlattenedComponents to iterate over a flattened view of their children, potentially themselves FlattenedComponents, invoking the childProcessor with its callbackContext on each renderable instance.

For each FlattenedComponent child, the childProcessor will be called on each of that FlattenedComponent's children, recursing if those children are themselves FlattenedComponents, otherwise, the childProcessor will be called on the child itself.

Throws:
IOException
See Also:
processFlattenedChildren(FacesContext, ComponentProcessor, UIComponent, Object), processFlattenedChildren(FacesContext, ComponentProcessor, Iterable, Object), processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, UIComponent, Object), FlattenedComponent

visitTree

public boolean visitTree(javax.faces.component.visit.VisitContext visitContext,
                         javax.faces.component.visit.VisitCallback callback)

Perform a tree visit starting at this node in the tree.

UIXComponent.visitTree() implementations do not invoke the VisitCallbackdirectly, but instead call VisitContext.invokeVisitCallback()to invoke the callback. This allows VisitContextimplementations to provide optimized tree traversals, for example by only calling the VisitCallbackfor a subset of components.

Overrides:
visitTree in class javax.faces.component.UIComponent
Parameters:
visitContext - the VisitContext for this visit
callback - the VisitCallback instance whose visit method will be called for each node visited.
Returns:
component implementations may return true to indicate that the tree visit is complete (eg. all components that need to be visited have been visited). This results in the tree visit being short-circuited such that no more components are visited.
See Also:
VisitContext.invokeVisitCallback()

getRenderedFacetsAndChildren

protected Iterator<javax.faces.component.UIComponent> getRenderedFacetsAndChildren(javax.faces.context.FacesContext facesContext)
Specifies what facets and children components should be processed as rendered for life-cycle methods. Any components not returned will not be processed during methods such as decoding, validating, updating the model, rendered-only tree visiting, etc.

Parameters:
facesContext - the facesContext
Returns:
An iterator of components to process. Must not return null (return an empty iterator if no children components should be processed).

visitChildren

protected boolean visitChildren(javax.faces.component.visit.VisitContext visitContext,
                                javax.faces.component.visit.VisitCallback callback)
Hook for subclasses to override the manner in which the component's children are visited. The default implementation visits all of the children and facets of the Component. setupChildrenVisitingContext will have been called before this method is invoked and tearDownChildrenVisitingContext will be called after. respectively. If the purpose of this visit was to encode the component and the component uses a CoreRenderer, the CoreRenderer's setupChildrenEncodingContext and tearDownChildrenEncodingContext will be called before and after this method is invoked, respectively.

Parameters:
visitContext - the VisitContext for this visit
callback - the VisitCallback instance
Returns:
true if the visit is complete.
See Also:
setupChildrenVisitingContext(javax.faces.context.FacesContext), tearDownChildrenVisitingContext(javax.faces.context.FacesContext), CoreRenderer.setupChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext, javax.faces.component.UIComponent), CoreRenderer.tearDownChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext, javax.faces.component.UIComponent)

visitAllChildren

protected final boolean visitAllChildren(javax.faces.component.visit.VisitContext visitContext,
                                         javax.faces.component.visit.VisitCallback callback)
Default implementation of visiting children that visits all children without iterating

Parameters:
visitContext - the VisitContext for this visit
callback - the VisitCallback instance
Returns:
true if the visit is complete.

visitTree

public static boolean visitTree(javax.faces.component.visit.VisitContext visitContext,
                                javax.faces.component.UIComponent component,
                                javax.faces.component.visit.VisitCallback callback)

Perform a tree visit starting at the specified node in the tree.

UIXComponent.visitTree() implementations do not invoke the VisitCallbackdirectly, but instead call VisitContext.invokeVisitCallback()to invoke the callback. This allows VisitContextimplementations to provide optimized tree traversals, for example by only calling the VisitCallbackfor a subset of components.

Parameters:
visitContext - the VisitContext for this visit
component - the UIComponent to start the visit from
callback - the VisitCallback instance whose visit method will be called for each node visited.
Returns:
component implementations may return true to indicate that the tree visit is complete (eg. all components that need to be visited have been visited). This results in the tree visit being short-circuited such that no more components are visited.
See Also:
VisitContext.invokeVisitCallback()

visitChildren

public static boolean visitChildren(javax.faces.component.visit.VisitContext visitContext,
                                    javax.faces.component.UIComponent parentComponent,
                                    javax.faces.component.visit.VisitCallback callback)
Utility method to allow the visiting of children components while visiting a parent using a new visit callback or visit context. The method may only be called when the parent is is the target of a visitation to ensure that it is properly in context.

Example usage:

@Override
 public VisitResult visit(
   VisitContext visitContext,
   UIComponent  target)
 {
   if (someCondition)
   {
     UIXComponent.visitChildren(target, visitContext, new VisitCallback() {...});
     return VisitResult.COMPLETE;
   }
   ...
 }

Parameters:
visitContext - the VisitContext for this visit
parentComponent - the UIComponent to visit the children. The parent component must be actively being visited in order to call this method.
callback - the VisitCallback instance whose visit method will be called for each node visited.
Returns:
component implementations may return true to indicate that the tree visit is complete (eg. all components that need to be visited have been visited). This results in the tree visit being short-circuited such that no more components are visited.

addPartialTarget

public static void addPartialTarget(javax.faces.context.FacesContext facesContext,
                                    PartialPageContext partialContext,
                                    javax.faces.component.UIComponent component)
Add a component as a partial target to the current request. This code handles the delegation to setPartialTarget(FacesContext, PartialPageContext) for UIXComponents or assumes for UIComponent that components with a renderer type are able to produce DOM elements that have IDs that can be replaced.

Parameters:
facesContext - the faces context
partialContext - the partial page context
component - the component to add as a target

clearCachedClientIds

public final void clearCachedClientIds()
Clears all of the cached clientIds in this component subtree


clearCachedClientIds

public static void clearCachedClientIds(javax.faces.component.UIComponent component)
Clears all of the cached clientIds in the component's subtree

Parameters:
component - Component subtree to clear the cached client ids for

setPartialTarget

protected void setPartialTarget(javax.faces.context.FacesContext facesContext,
                                PartialPageContext partialContext)
Marks this component as a partial target for this request. Typically called by the RequestContext. The component should add the client ID the desired rendered component to the context. This allows components that do not render a replacable DOM element with an ID to choose an alternative component, like a parent.

Parameters:
facesContext - the faces context
partialContext - the partial page context

isVisitable

protected boolean isVisitable(javax.faces.component.visit.VisitContext visitContext)

Called by UIXComponent.visitTree()to determine whether this component is "visitable" - ie. whether this component satisfies the VisitHintreturned by VisitContext.getHints().

If this component is not visitable (ie. if this method returns false), the tree visited is short-circuited such that neither the component nor any of its descendents will be visited>

Custom treeVisit()implementations may call this method to determine whether the component is visitable before performing any visit-related processing.

Overrides:
isVisitable in class javax.faces.component.UIComponent
Parameters:
visitContext - VisitingContext to use to determine if the component is visitable
Returns:
true if this component should be visited, false otherwise.

partialEncodeVisit

public javax.faces.component.visit.VisitResult partialEncodeVisit(javax.faces.component.visit.VisitContext visitContext,
                                                                  PartialPageContext partialContext,
                                                                  javax.faces.component.visit.VisitCallback callback)

Called when visiting the component during optimized partial page encoding so that the component can modify what is actually encoded. For example tab controls often render the tabs for the ShowDetailItems in the tab bar before delegating to the disclosed ShowDetailItem to render the tab content. As a result, the tab control needs to encode its tab bar if any of its ShowDetailItems are partial targets so that the tab labels, for example, are up-to-date.

The default implementation delegates to the CoreRenderer if this component has one, otherwise it calls the VisitCallback and returns its result if this UIXComponent is a partial target of the current encoding.

Parameters:
visitContext - VisitContext to pass to the VisitCallback
partialContext - PartialPageContext for the current partial encoding
callback - VisitCallback to call if this component is a partial target
Returns:
The VisitResult controlling continued iteration of the visit.

setupVisitingContext

protected void setupVisitingContext(javax.faces.context.FacesContext context)

Sets up the context necessary to visit or invoke the component for all phases.

The default implementation does nothing.

If a subclass overrides this method, it should override tearDownVisitingContext as well.

It is guaranteed that if setupVisitingContext completes tearDownVisitingContext will be called for this component

Parameters:
context - FacesContext
See Also:
tearDownVisitingContext(javax.faces.context.FacesContext), setupEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), tearDownEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), #setupChildrenVistingContext

setupChildrenVisitingContext

protected void setupChildrenVisitingContext(javax.faces.context.FacesContext context)

Sets up the context necessary to visit or invoke the children of a component for all phases.

The default implementation does nothing.

If a subclass overrides this method, it should override tearDownChildrenVisitingContext as well.

It is guaranteed that if setupChildrenVisitingContext completes tearDownChildrenVisitingContext will be called for this component

Parameters:
context - FacesContext
See Also:
visitChildren(javax.faces.component.visit.VisitContext, javax.faces.component.visit.VisitCallback), tearDownChildrenVisitingContext(javax.faces.context.FacesContext), setupVisitingContext

tearDownVisitingContext

protected void tearDownVisitingContext(javax.faces.context.FacesContext context)

Tears down context created in order to visit or invoke the component for all phases.

The default implementation does nothing.

A subclass should only override this method if it overrode setupVisitingContext as well

It is guaranteed that tearDownVisitingContext will be called only after setupVisitingContext has been called for this component

Parameters:
context - FacesContext
See Also:
setupVisitingContext(javax.faces.context.FacesContext), setupEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), tearDownEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext)

tearDownChildrenVisitingContext

protected void tearDownChildrenVisitingContext(javax.faces.context.FacesContext context)

Tears down context created in order to visit or invoke the children of a component for all phases.

The default implementation does nothing.

A subclass should only override this method if it overrode setupChildrenVisitingContext as well

It is guaranteed that tearDownChildrenVisitingContext will be called only after setupChildrenVisitingContext has been called for this component

Parameters:
context - FacesContext
See Also:
setupChildrenVisitingContext(javax.faces.context.FacesContext), visitChildren(javax.faces.component.visit.VisitContext, javax.faces.component.visit.VisitCallback)

setUpEncodingContext

@Deprecated
protected final void setUpEncodingContext(javax.faces.context.FacesContext context,
                                                     RenderingContext rc)
Deprecated. 


setupEncodingContext

protected void setupEncodingContext(javax.faces.context.FacesContext context,
                                    RenderingContext rc)

Sets up the context necessary to encode the component.

The default implementation delegates to CoreRenderer.setupEncodingContext and then calls setupVisitingContext

If a subclass overrides this method, it should override tearDownEncodingContext as well.

It is guaranteed that if setUpEncodingContext completes tearDownEncodingContext will be called for this component

During partial page rendering traversals, setupEncodingContext is not called before the VisitCallback is invoked. This behavior is different than for setupVisitingContext, which is always called before the VisitCallback is invoked for non-partial page rendering visits. This difference in behavior allows the VisitCallback in a partial page rendering visit to safely call UIComponent.encodeAll, which in the case of a UIXComponent, will call UIXComponent.setupEncodeContext.

Parameters:
context - The FacesContext
rc - RenderingContext to use for encoding
See Also:
setupVisitingContext(javax.faces.context.FacesContext), setupChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), tearDownVisitingContext(javax.faces.context.FacesContext), tearDownEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), CoreRenderer.setupEncodingContext(FacesContext, RenderingContext, UIComponent)

setupChildrenEncodingContext

public void setupChildrenEncodingContext(javax.faces.context.FacesContext context,
                                         RenderingContext rc)
Sets the context necessary to encode the children of a component.

Parameters:
context - The FacesContext
rc - RenderingContext to use for encoding
See Also:
setupChildrenVisitingContext(javax.faces.context.FacesContext), tearDownChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), setupEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), CoreRenderer.setupChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext, javax.faces.component.UIComponent)

tearDownEncodingContext

protected void tearDownEncodingContext(javax.faces.context.FacesContext context,
                                       RenderingContext rc)

Tears down the context created in order to encode the component

The default implementation delegates to CoreRenderer.tearDownEncodingContext and then calls tearDownVisitingContext

A subclass should only override this method if it overrode setupEncodingContext as well

It is guaranteed that tearDownEncodingContext will be called only after setupEncodingContext has been called for this component

Parameters:
context - The FacesContext
rc - RenderingContext to use for encoding
See Also:
setupEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), tearDownVisitingContext(javax.faces.context.FacesContext), setupEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), tearDownChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), CoreRenderer.tearDownEncodingContext(FacesContext, RenderingContext, UIComponent)

tearDownChildrenEncodingContext

public void tearDownChildrenEncodingContext(javax.faces.context.FacesContext context,
                                            RenderingContext rc)
Tears down the context necessary to encode the children of a component.

Parameters:
context - The FacesContext
rc - RenderingContext to use for encoding
See Also:
setupChildrenVisitingContext(javax.faces.context.FacesContext), tearDownChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), tearDownEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext), CoreRenderer.setupChildrenEncodingContext(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext, javax.faces.component.UIComponent)

getFacesBean

public abstract FacesBean getFacesBean()
Returns the FacesBean used for storing the component's state.


addAttributeChangeListener

public abstract void addAttributeChangeListener(AttributeChangeListener acl)
Adds an AttributeChangeListener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.


removeAttributeChangeListener

public abstract void removeAttributeChangeListener(AttributeChangeListener acl)
Removes an AttributeChangeListener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.


getAttributeChangeListeners

public abstract AttributeChangeListener[] getAttributeChangeListeners()
Gets the registered AttributeChangeListeners.


setAttributeChangeListener

public abstract void setAttributeChangeListener(javax.el.MethodExpression me)
Sets a method binding to an AttributeChangeListener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.


getAttributeChangeListener

public abstract javax.el.MethodExpression getAttributeChangeListener()
Gets the method binding to an AttributeChangeListener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.


markInitialState

public abstract void markInitialState()
Specified by:
markInitialState in interface javax.faces.component.PartialStateHolder
Overrides:
markInitialState in class javax.faces.component.UIComponent

getContainerClientId

public abstract String getContainerClientId(javax.faces.context.FacesContext context,
                                            javax.faces.component.UIComponent child)
Provides additional context (the target child component for which the container client ID is requested) to a naming container for constructing a client ID. This is useful for components such as @link UIXTable and @link UIXTreeTable which need to return different container client IDs for stamped and non-stamped child components.

See Also:
UIXComponentBase.getClientId(FacesContext context)

getLogicalParent

public javax.faces.component.UIComponent getLogicalParent()
Provides a logical parent for this component (a parent in the context of the document where this component was defined). The default implementation will simply call getParent(). Components that get relocated during tag execution will return their original parent

Returns:
logical parent component

getLogicalParent

public static javax.faces.component.UIComponent getLogicalParent(javax.faces.component.UIComponent component)
Provides a logical parent for the component (a parent in the context of the document where the component was defined). The default implementation will simply call getParent() on the component. Components that get relocated during tag execution should have their original parent returned (if available).

Parameters:
component - - child component whose parent is being retrieved
Returns:
logical parent component

getStateHelper

protected javax.faces.component.StateHelper getStateHelper()
We are using FacesBean to save state, which does not implement StateHelper, so calling this method will call UnsupportedOperationException

Overrides:
getStateHelper in class javax.faces.component.UIComponent

getStateHelper

protected javax.faces.component.StateHelper getStateHelper(boolean create)
We are using FacesBean to save state, which does not implement StateHelper, so calling this method will call UnsupportedOperationException

Overrides:
getStateHelper in class javax.faces.component.UIComponent


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.