Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


oracle.adf.view.rich.context
Class AdfFacesContext

java.lang.Object
  extended by oracle.adf.view.rich.context.AdfFacesContext


public abstract class AdfFacesContext
extends java.lang.Object

A context object that largely exists as a mirror for the Apache Trinidad RequestContext, but also provides ADF Faces-specific APIs.


Nested Class Summary
static class AdfFacesContext.OutputMode
          Enumeration representing OutputModes

 

Field Summary
static java.lang.String VARIABLE_NAME
          Name of the EL implicit variable ("adfFacesContext") that is used to expose this context object.

 

Constructor Summary
AdfFacesContext()
           

 

Method Summary
abstract  void addPartialTarget(javax.faces.component.UIComponent newTarget)
          Add a component as a partial target.
abstract  void addPartialTriggerListeners(javax.faces.component.UIComponent listener, java.lang.String[] trigger)
          Adds a listener on a set of particular triggering components.
abstract  java.lang.String getAccessibilityMode()
          Returns the name of the current accessibility mode.
 Agent getAgent()
          Returns the Agent information for the current context
abstract  ApplicationContextManager getApplicationContextManager()
          Returns the ApplicationContextManager instance used to manage re-entrant application context invocation.
abstract  BackingBeanScopeProvider getBackingBeanScopeProvider()
          Returns a BackingBeanScopeProvider instance and is shared across the entire application.
 ChangeManager getChangeManager()
          Gets the ChangeManager for the current application.
abstract  java.util.List<java.awt.Color> getColorPalette(java.lang.String name)
          Returns a List that takes color palette name as key, and returns the color palette as a result.
abstract  java.lang.String getCurrencyCode()
          Return the ISO 4217 currency code used by default for formatting currency fields when those fields do not specify an explicit currency field via their converter.
static AdfFacesContext getCurrentInstance()
          Retrieves the AdfFacesContext active for the current thread.
abstract  DataUpdateManager getDataUpdateManager()
          Returns the DataUpdateManager to use for registering and unregistering components for use with eitehr automatic PPR or active Datata
abstract  char getDecimalSeparator()
          Return the separator used as the decimal point.
abstract  DialogService getDialogService()
          Returns an DialogService, which exposes a number of APIs needed by component and framework developers.
abstract  DirtyPageHandler getDirtyPageHandler()
          Returns DirtyPageHandler service registered under meta-inf/services or a default implementation if none was found
abstract  EndUserMonitoringService getEndUserMonitoringService()
          Returns the EndUserMonitoringService that provides the ability to log key performance data for every user initiated action on a page.
abstract  ExecutionContextProvider getExecutionContextProvider()
          Returns an ExecutionContextDataProvider to use for retrieving context information pertaining to the current request.
abstract  java.util.Map getFormatter()
          Returns a Map that performs message formatting with a recursive Map structure.
abstract  HelpProvider getHelpProvider()
          Gets the HelpProvider that is registered in META-INF/adf-settings.xml.
 java.util.Map getHelpSystem()
          Deprecated. on 24-jan-2007, for 11.1.1.0.JI2. Use the new HelpProvider framework.
 java.util.Map getHelpTopic()
          Deprecated. on 24-jan-2007, for 11.1.1.0.JI2. Use the new HelpProvider framework.
abstract  NewSessionURLProvider getNewSessionURLProvider()
          Returns the NewSessionURLProvider instance
abstract  char getNumberGroupingSeparator()
          Return the separator used for groups of numbers.
 java.lang.String getOracleHelpServletUrl()
          Deprecated. on 24-jan-2007, for 11.1.1.0.JI2. Use the new HelpProvider framework.
 java.lang.String getOutputMode()
          Returns the "output mode" - printable, etc.
 AdfFacesContext.OutputMode getOutputModeEnum()
          Returns the OutputMode enumeration
abstract  java.util.Map<java.lang.String,java.lang.Object> getPageFlowScope()
          Returns a Map of objects at "pageFlow" scope.
 PageFlowScopeProvider getPageFlowScopeProvider()
          Gets the PageFlowScopeProvider for the current application.
 PageResolver getPageResolver()
          Gets the PageResolver for the current application.
abstract  org.apache.myfaces.trinidad.change.ChangeManager getPersistentChangeManager()
          Returns the persistent change manager registered through web.xml for the current application
 java.util.Map getProcessScope()
          Deprecated. since 11.0; use getPageFlowScope()
 RegionManager getRegionManager()
          Gets the RegionManager for the current application.
abstract  java.lang.String getSkinFamily()
          Returns the name of the preferred skin family.
abstract  java.util.TimeZone getTimeZone()
          Returns the default TimeZone used for interpreting and formatting date values.
abstract  int getTwoDigitYearStart()
          Returns the year offset for parsing years with only two digits.
abstract  UriManager getUriManager()
          Retrieves an instance of UriManager for manipulation browser URIs
abstract  java.util.Map<java.lang.String,java.lang.Object> getViewScope()
          Returns a Map of objects at "view" scope.
abstract  WindowIdProvider getWindowIdProvider()
          Returns the WindowIdProvider object
abstract  WindowIdProvider getWindowIdProvider(javax.faces.context.ExternalContext externalContext)
          Returns the WindowIdProvider object from the ExternalContext
abstract  boolean isClientValidationDisabled()
          Returns true if client-side validation should be disabled.
abstract  boolean isDebugOutput()
          Returns true if output should contain debugging information.
abstract  boolean isFurtherValidationNeeded()
          Returns true if a framework providing additional validation on top of the faces lifecycle should run that validation.
abstract  boolean isInitialRender()
          Returns true if this request is the first request to render the page.
abstract  boolean isPartialRequest(javax.faces.context.FacesContext context)
          Method to indicate if this current HTTP request is a partial page rendering request.
abstract  boolean isPostback()
          Returns true if JSF is currently processing a postback request.
abstract  boolean isRightToLeft()
          Returns true if the user should be shown output in right-to-left.
abstract  void launchDialog(javax.faces.component.UIViewRoot dialogRoot, java.util.Map dialogParameters, javax.faces.component.UIComponent source, boolean useWindow, java.util.Map windowProperties)
          Launch a dialog, optionally raising it in a new dialog window.
abstract  void partialUpdateNotify(javax.faces.component.UIComponent updated)
          Called when any component gets updated.
abstract  void queueTaskForAfterPhase(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId, java.lang.Runnable task)
          Queue a task that will be run after a phase.
abstract  void queueTaskForBeforePhase(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId, java.lang.Runnable task)
          Queue a task that will be run before a phase.
abstract  javax.faces.component.UIComponent restoreComponent(java.lang.Object state)
          Restores the state of a component.
abstract  void returnFromDialog(java.lang.Object returnValue, java.util.Map returnParameters)
          Returns from a dialog raised by a UIXCommand component, or any component implementing DialogSource, or any direct calls to launchDialog().
abstract  java.lang.Object saveComponent(javax.faces.component.UIComponent component)
          Saves the state of a UIComponent tree into an Object.
abstract  void setFurtherValidationNeeded(boolean validationNeeded)
          Used by internal ADF Faces code.

 

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

 

Field Detail

VARIABLE_NAME

public static final java.lang.String VARIABLE_NAME
Name of the EL implicit variable ("adfFacesContext") that is used to expose this context object.
See Also:
Constant Field Values

Constructor Detail

AdfFacesContext

public AdfFacesContext()

Method Detail

getCurrentInstance

public static AdfFacesContext getCurrentInstance()
Retrieves the AdfFacesContext active for the current thread.

queueTaskForAfterPhase

public abstract void queueTaskForAfterPhase(javax.faces.context.FacesContext context,
                                            javax.faces.event.PhaseId phaseId,
                                            java.lang.Runnable task)
Queue a task that will be run after a phase.
Parameters:
context - the FacesContext
phaseId - the phase after which it must be run; ANY_PHASE is not supported
task - a Runnable that implements the task

queueTaskForBeforePhase

public abstract void queueTaskForBeforePhase(javax.faces.context.FacesContext context,
                                             javax.faces.event.PhaseId phaseId,
                                             java.lang.Runnable task)
Queue a task that will be run before a phase.
Parameters:
context - the FacesContext
phaseId - the phase after which it must be run; ANY_PHASE is not supported
task - a Runnable that implements the task

getWindowIdProvider

public abstract WindowIdProvider getWindowIdProvider()
Returns the WindowIdProvider object

getWindowIdProvider

public abstract WindowIdProvider getWindowIdProvider(javax.faces.context.ExternalContext externalContext)
Returns the WindowIdProvider object from the ExternalContext

getNewSessionURLProvider

public abstract NewSessionURLProvider getNewSessionURLProvider()
Returns the NewSessionURLProvider instance

getDataUpdateManager

public abstract DataUpdateManager getDataUpdateManager()
Returns the DataUpdateManager to use for registering and unregistering components for use with eitehr automatic PPR or active Datata

getDirtyPageHandler

public abstract DirtyPageHandler getDirtyPageHandler()
Returns DirtyPageHandler service registered under meta-inf/services or a default implementation if none was found
Returns:
DirtyPageHandler

getEndUserMonitoringService

public abstract EndUserMonitoringService getEndUserMonitoringService()
Returns the EndUserMonitoringService that provides the ability to log key performance data for every user initiated action on a page. EndUserMonitoringService instance is shared across the entire application. If no service is registered, this method will return a stub implementation that disables monitoring.
Returns:
the instance of EndUserMonitoringService

getExecutionContextProvider

public abstract ExecutionContextProvider getExecutionContextProvider()
Returns an ExecutionContextDataProvider to use for retrieving context information pertaining to the current request. ExecutionContextDataProvider instance is shared across the entire application. If no context provider is registered, this method will return a stub provider object that returns a null ExecutionContext.
Returns:
the instance of ExecutionContextProvider

getBackingBeanScopeProvider

public abstract BackingBeanScopeProvider getBackingBeanScopeProvider()
Returns a BackingBeanScopeProvider instance and is shared across the entire application. If no context provider is registered, this method will return a stub provider instance that has noop implementations its methods.
Returns:
the instance of BackingBeanScopeProvider

getViewScope

public abstract java.util.Map<java.lang.String,java.lang.Object> getViewScope()
Returns a Map of objects at "view" scope. The lifetime of "view" scope is the period that the user interacts with this page instance in a particular view window. Thus, two windows on the same view id will have different "view" scopes.

The viewScope will not be available if there is no FacesContext


getPageFlowScope

public abstract java.util.Map<java.lang.String,java.lang.Object> getPageFlowScope()
Returns a Map of objects at "pageFlow" scope.

getProcessScope

@Deprecated
public final java.util.Map getProcessScope()
Deprecated. since 11.0; use getPageFlowScope()

returnFromDialog

public abstract void returnFromDialog(java.lang.Object returnValue,
                                      java.util.Map returnParameters)
Returns from a dialog raised by a UIXCommand component, or any component implementing DialogSource, or any direct calls to launchDialog().
Parameters:
returnValue - the value to be delivered in the the ReturnEvent
See Also:
ReturnEvent

getDialogService

public abstract DialogService getDialogService()
Returns an DialogService, which exposes a number of APIs needed by component and framework developers. This will only rarely be needed by page authors.

launchDialog

public abstract void launchDialog(javax.faces.component.UIViewRoot dialogRoot,
                                  java.util.Map dialogParameters,
                                  javax.faces.component.UIComponent source,
                                  boolean useWindow,
                                  java.util.Map windowProperties)
Launch a dialog, optionally raising it in a new dialog window.

The dialog will receive a new pageFlowScope map, which includes all the values of the currently available pageFlowScope as well as a set of properties passed to this function in the dialogParameters map. Changes to this newly created scope will not be visible once the dialog returns.

Parameters:
dialogRoot - the UIViewRoot for the page being launched
dialogParameters - a set of parameters to populate the newly created pageFlowScope
source - the UIComponent that launched the dialog and should receive the ReturnEvent when the dialog is complete.
useWindow - if true, use a popup window for the dialog if available on the current user agent device
windowProperties - the set of UI parameters used to modify the window, if one is used. The set of properties that\ are supported will depend on the RenderKit, but common examples include "width", "height", "top" and "left".

isPostback

public abstract boolean isPostback()
Returns true if JSF is currently processing a postback request. isPostback() will return false if this is a request for an initial render of a page (that is, if Apply Request Values never executes), or if during the request the user is navigated to a different page (because of a navigation rule, etc). For example, during a request that results in a navigation to a new page, isPostback() will return true from Apply Request Values to Invoke Application, then false afterwards; whereas if there was no navigation, it would return true

The value of this method is undefined during (or before) the Restore View phase, but can be used in the afterPhase() method of a PhaseListener for Restore View.

In general, use of this method and its exposed EL variable is discouraged. In practice, callers of this method have attempted to use isPostback as a proxy for some piece of application state. It is always better to model these cases in terms of the actual application state, as using isPostback is often neither an exact proxy for the application state, or as the application and view technology change, the validity of the isPostback proxy can drift from the application state that it is acting as a proxy for.

See Also:
isInitialRender()

isInitialRender

public abstract boolean isInitialRender()
Returns true if this request is the first request to render the page.

Use of this method (and its exposed EL variable) is discouraged. In practice, callers attempt to use the initial render of a page to represent a state better modeled in the application itself. In other cases, view scoped managed beans with @PostConstruct annotations might be more appropriate. In general, the only valid use case is as part of a minimal effort (but probably still incorrect) migration from uses of isPostback in 10.1.3 code to isInitialRender in version 11 code.

See Also:
isPostback()

isPartialRequest

public abstract boolean isPartialRequest(javax.faces.context.FacesContext context)
Method to indicate if this current HTTP request is a partial page rendering request.
Parameters:
context - the FacesContext object for the request we are processing
Returns:
is this request a PPR request?

isFurtherValidationNeeded

public abstract boolean isFurtherValidationNeeded()
Returns true if a framework providing additional validation on top of the faces lifecycle should run that validation. This value is currently only guaranteed to be meaningful at the end of the Update Model phase.

setFurtherValidationNeeded

public abstract void setFurtherValidationNeeded(boolean validationNeeded)
Used by internal ADF Faces code. Do not call.

isDebugOutput

public abstract boolean isDebugOutput()
Returns true if output should contain debugging information.

isClientValidationDisabled

public abstract boolean isClientValidationDisabled()
Returns true if client-side validation should be disabled.

getOutputMode

public java.lang.String getOutputMode()
Returns the "output mode" - printable, etc.

getOutputModeEnum

public AdfFacesContext.OutputMode getOutputModeEnum()
Returns the OutputMode enumeration
Returns:

getSkinFamily

public abstract java.lang.String getSkinFamily()
Returns the name of the preferred skin family.

getAccessibilityMode

public abstract java.lang.String getAccessibilityMode()
Returns the name of the current accessibility mode.

isRightToLeft

public abstract boolean isRightToLeft()
Returns true if the user should be shown output in right-to-left.

getNumberGroupingSeparator

public abstract char getNumberGroupingSeparator()
Return the separator used for groups of numbers. If NUL (zero), use the default separator for the current language.

getDecimalSeparator

public abstract char getDecimalSeparator()
Return the separator used as the decimal point. If NUL (zero), use the default separator for the current language.

getCurrencyCode

public abstract java.lang.String getCurrencyCode()
Return the ISO 4217 currency code used by default for formatting currency fields when those fields do not specify an explicit currency field via their converter. If this returns null, the default code for the current locale will be used.

getTwoDigitYearStart

public abstract int getTwoDigitYearStart()
Returns the year offset for parsing years with only two digits. If not set this is defaulted to 1950 This is used by @link{oracle.adf.faces.view.converter.DateTimeConverter} while converting strings to Date object.

getOracleHelpServletUrl

@Deprecated
public java.lang.String getOracleHelpServletUrl()
Deprecated. on 24-jan-2007, for 11.1.1.0.JI2. Use the new HelpProvider framework.
Return the URL to an Oracle Help for the Web servlet.

getHelpProvider

public abstract HelpProvider getHelpProvider()
Gets the HelpProvider that is registered in META-INF/adf-settings.xml.
See Also:
adf-settings.xml example

getHelpTopic

@Deprecated
public java.util.Map getHelpTopic()
Deprecated. on 24-jan-2007, for 11.1.1.0.JI2. Use the new HelpProvider framework.
Returns a Map that will accept topic names as keys, and return an URL as a result.

getHelpSystem

@Deprecated
public java.util.Map getHelpSystem()
Deprecated. on 24-jan-2007, for 11.1.1.0.JI2. Use the new HelpProvider framework.
Returns a Map that will accept help system properties as keys, and return an URL as a result.

getTimeZone

public abstract java.util.TimeZone getTimeZone()
Returns the default TimeZone used for interpreting and formatting date values.

getChangeManager

public ChangeManager getChangeManager()
Gets the ChangeManager for the current application.

getPersistentChangeManager

public abstract org.apache.myfaces.trinidad.change.ChangeManager getPersistentChangeManager()
Returns the persistent change manager registered through web.xml for the current application
Returns:
ChangeManager instance

getApplicationContextManager

public abstract ApplicationContextManager getApplicationContextManager()
Returns the ApplicationContextManager instance used to manage re-entrant application context invocation. This could occur if UIComponent.invokeOnComponent(FacesContext,String,ContextCallback) is called recursively, or in response to in-context event delivery. Any component or application artifact that modifies the application context (by for example setting request attributes or modifying a custom ELResolver) must use the ApplicationContextManager to register their changes to the application context during non-component traversals. For UIComponents, this is modifications that the components make during invokeOnComponent() and during in-context event delivery.
See Also:
ApplicationContextManager

getPageFlowScopeProvider

public PageFlowScopeProvider getPageFlowScopeProvider()
Gets the PageFlowScopeProvider for the current application.

getPageResolver

public PageResolver getPageResolver()
Gets the PageResolver for the current application.

getRegionManager

public RegionManager getRegionManager()
Gets the RegionManager for the current application.

addPartialTarget

public abstract void addPartialTarget(javax.faces.component.UIComponent newTarget)
Add a component as a partial target. In response to a partial event, only components registered as partial targets are re-rendered. For a component to be successfully re-rendered when it is manually added with this API, it should have the "clientComponent" attribute set to true. If not, partial re-rendering may or may not work depending on the component.

addPartialTriggerListeners

public abstract void addPartialTriggerListeners(javax.faces.component.UIComponent listener,
                                                java.lang.String[] trigger)
Adds a listener on a set of particular triggering components. If one of the named components gets updated in response to a partial event, then this listener component will be rerendered during the render phase (i.e. it will be added as a partialTarget). The list should consist of names suitable for use with the findComponent method on UIComponent.

partialUpdateNotify

public abstract void partialUpdateNotify(javax.faces.component.UIComponent updated)
Called when any component gets updated. Any partial target components listening on this component will be added to the partialTargets list in the render phase.

getColorPalette

public abstract java.util.List<java.awt.Color> getColorPalette(java.lang.String name)
Returns a List that takes color palette name as key, and returns the color palette as a result.

getFormatter

public abstract java.util.Map getFormatter()
Returns a Map that performs message formatting with a recursive Map structure. The first key must be the message formatting mask, and the second the first parameter into the message. (The formatter Map supports only a single parameter at this time.)

getAgent

public Agent getAgent()
Returns the Agent information for the current context

saveComponent

public abstract java.lang.Object saveComponent(javax.faces.component.UIComponent component)
Saves the state of a UIComponent tree into an Object. The Object will be serializable, unless a UIComponent in this tree contains a non-serializable property. This method does not check that condition.
Parameters:
component - the component
Returns:
an Object that can be passed to restoreComponent() to reinstantiate the state

restoreComponent

public abstract javax.faces.component.UIComponent restoreComponent(java.lang.Object state)
                                                            throws java.lang.ClassNotFoundException,
                                                                   java.lang.InstantiationException,
                                                                   java.lang.IllegalAccessException
Restores the state of a component.
Parameters:
state - an Object created by a prior call to saveComponent().
Returns:
the component
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

getUriManager

public abstract UriManager getUriManager()
Retrieves an instance of UriManager for manipulation browser URIs
Returns:
UriManager instance

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


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