Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-05


oracle.adf.view.rich.component.fragment
Class ContextSwitchingComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by oracle.adf.view.rich.component.fragment.ContextSwitchingComponent

All Implemented Interfaces:
javax.faces.component.StateHolder, org.apache.myfaces.trinidad.component.FlattenedComponent
Direct Known Subclasses:
UIXInclude

public abstract class ContextSwitchingComponent
extends org.apache.myfaces.trinidad.component.UIXComponentBase
implements org.apache.myfaces.trinidad.component.FlattenedComponent

This class facilitates creating components that provide their own EL variables to child components.

The UIXComponent.setupVisitingContext(javax.faces.context.FacesContext) method is called before a child component is being decoded, validated or updated. It is also called before an event is delivered to a child component. Implementations should provide an implmentation of this method that puts the EL variables into scope.

The UIXComponent.tearDownVisitingContext(javax.faces.context.FacesContext) method is called after the child components have been processed. Implementations should restore any EL variables that were modified by UIXComponent.setupVisitingContext(javax.faces.context.FacesContext).


Field Summary

 

Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY, TYPE

 

Fields inherited from class javax.faces.component.UIComponent
bindings

 

Constructor Summary
ContextSwitchingComponent()
           
ContextSwitchingComponent(java.lang.String rendererType)
           

 

Method Summary
 void broadcast(javax.faces.event.FacesEvent event)
           
 void encodeBegin(javax.faces.context.FacesContext context)
           
 void encodeEnd(javax.faces.context.FacesContext context)
           
protected  void finishComponentEncoding(javax.faces.context.FacesContext context)
           
 boolean invokeOnComponent(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback)
          Override to always setup the visiting context before invoking the callback, or our children
 boolean isFlatteningChildren(javax.faces.context.FacesContext context)
          Returns true if this FlattenedComponent is currently flattening its children
 void processDecodes(javax.faces.context.FacesContext context)
           
<S> boolean
processFlattenedChildren(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.component.ComponentProcessingContext cpContext, org.apache.myfaces.trinidad.component.ComponentProcessor<S> childProcessor, S callbackContext)
          Set up the component context, process all of the renderable children of this component, and the restore the previous context, returning true if any of the children were processed.
 void processUpdates(javax.faces.context.FacesContext context)
           
 void processValidators(javax.faces.context.FacesContext context)
           
 void queueEvent(javax.faces.event.FacesEvent event)
           
 void restoreContext(javax.faces.context.FacesContext context)
          Force restore of the parent context.
 void setupContext(javax.faces.context.FacesContext context)
          Force setup the correct context for this component's children.

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBeanType, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getFamily, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnChildrenComponents, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, removeAttributeChangeListener, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent
addPartialTarget, encodeFlattenedChild, encodeFlattenedChildren, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setUpEncodingContext, setupVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitTree, visitTree

 

Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

ContextSwitchingComponent

public ContextSwitchingComponent()

ContextSwitchingComponent

public ContextSwitchingComponent(java.lang.String rendererType)

Method Detail

setupContext

public final void setupContext(javax.faces.context.FacesContext context)
Force setup the correct context for this component's children.

restoreContext

public final void restoreContext(javax.faces.context.FacesContext context)
Force restore of the parent context. This should undo any changes caused to the context by the setupContext(javax.faces.context.FacesContext) method.

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Overrides:
queueEvent in class org.apache.myfaces.trinidad.component.UIXComponentBase

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class org.apache.myfaces.trinidad.component.UIXComponentBase
Throws:
javax.faces.event.AbortProcessingException

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Overrides:
processDecodes in class org.apache.myfaces.trinidad.component.UIXComponentBase

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Overrides:
processValidators in class org.apache.myfaces.trinidad.component.UIXComponentBase

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
Overrides:
processUpdates in class org.apache.myfaces.trinidad.component.UIXComponentBase

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class org.apache.myfaces.trinidad.component.UIXComponentBase
Throws:
java.io.IOException

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context)
               throws java.io.IOException
Overrides:
encodeEnd in class org.apache.myfaces.trinidad.component.UIXComponentBase
Throws:
java.io.IOException

invokeOnComponent

public boolean invokeOnComponent(javax.faces.context.FacesContext context,
                                 java.lang.String clientId,
                                 javax.faces.component.ContextCallback callback)
                          throws javax.faces.FacesException
Override to always setup the visiting context before invoking the callback, or our children
Overrides:
invokeOnComponent in class org.apache.myfaces.trinidad.component.UIXComponentBase
Throws:
javax.faces.FacesException
See Also:
UIXComponent.setupVisitingContext(javax.faces.context.FacesContext), UIXComponent.tearDownVisitingContext(javax.faces.context.FacesContext)

finishComponentEncoding

protected final void finishComponentEncoding(javax.faces.context.FacesContext context)
                                      throws java.io.IOException
Throws:
java.io.IOException

processFlattenedChildren

public <S> boolean processFlattenedChildren(javax.faces.context.FacesContext context,
                                            org.apache.myfaces.trinidad.component.ComponentProcessingContext cpContext,
                                            org.apache.myfaces.trinidad.component.ComponentProcessor<S> childProcessor,
                                            S callbackContext)
                                 throws java.io.IOException
Set up the component context, process all of the renderable children of this component, and the restore the previous context, returning true if any of the children were processed.
Specified by:
processFlattenedChildren in interface org.apache.myfaces.trinidad.component.FlattenedComponent
Parameters:
context - Current FacesContext
cpContext - ComponentProcesingContext representing the current child iteration state
childProcessor - ComponentProcessor to call for each flattened child
callbackContext - childProcessor-specific context to be passed on each call to the childProcessor
Returns:
true if this FlattenedComponent actually processed any children
Throws:
java.io.IOException - if an error occurs while processing children

isFlatteningChildren

public boolean isFlatteningChildren(javax.faces.context.FacesContext context)
Returns true if this FlattenedComponent is currently flattening its children
Specified by:
isFlatteningChildren in interface org.apache.myfaces.trinidad.component.FlattenedComponent
Parameters:
context - FacesContext
Returns:
true if this FlattenedComponent is currently flattening its children

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-05


Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.