oracle.adf.view.faces.context
Class AdfFacesContext

java.lang.Object
  extended byoracle.adf.view.faces.context.AdfFacesContext

public abstract class AdfFacesContext
extends java.lang.Object

Context class for all per-request and per-webapp information required by ADF Faces. A AdfFacesContext object can be retrieved with the static getCurrentInstance() method. There is one and only one AdfFacesContext object active in any one thread.

This class does not extend FacesContext; this is intentional, as extending FacesContext requires taking over the FacesContextFactory.


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
protected AdfFacesContext()
          Creates an AdfFacesContext.
 
Method Summary
abstract  void addPartialTarget(UIComponent newTarget)
          Add a component as a partial target.
abstract  void addPartialTriggerListeners(UIComponent listener, java.lang.String[] trigger)
          Adds a listener on a set of particular triggering components.
 void attach()
          Attaches a AdfFacesContext to the current thread.
abstract  java.lang.String getAccessibilityMode()
          Returns the name of the current accessibility mode.
abstract  Agent getAgent()
          Returns the Agent information for the current context
abstract  ChangeManager getChangeManager()
          Gets the ChangeManager for the current application.
abstract  java.util.Map getColorPalette()
          Returns a Map that takes color palette names as keys, 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  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  java.util.Map getFormatter()
          Returns a Map that performs message formatting with a recursive Map structure.
abstract  java.util.Map getHelpSystem()
          Returns a Map that will accept help system properties as keys, and return an URL as a result.
abstract  java.util.Map getHelpTopic()
          Returns a Map that will accept topic names as keys, and return an URL as a result.
abstract  char getNumberGroupingSeparator()
          Return the separator used for groups of numbers.
abstract  java.lang.String getOracleHelpServletUrl()
          Return the URL to an Oracle Help for the Web servlet.
abstract  java.lang.String getOutputMode()
          Returns the "output mode" - printable, etc.
abstract  java.util.Map getProcessScope()
          Returns a Map of objects at "process" scope.
abstract  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  UploadedFileProcessor getUploadedFileProcessor()
           
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 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(UIViewRoot dialogRoot, java.util.Map dialogParameters, UIComponent source, boolean useWindow, java.util.Map windowProperties)
          Launch a dialog, optionally raising it in a new dialog window.
abstract  void partialUpdateNotify(UIComponent updated)
          Called when any component gets updated.
 void release()
          Releases the AdfFacesContext object.
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().
 
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

protected AdfFacesContext()
Creates an AdfFacesContext. AdfFacesContext is abstract and may not be instantiated directly.

See Also:
AdfFacesContextFactory
Method Detail

getCurrentInstance

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


getProcessScope

public abstract java.util.Map getProcessScope()
Returns a Map of objects at "process" scope.


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(UIViewRoot dialogRoot,
                                  java.util.Map dialogParameters,
                                  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 processScope map, which includes all the values of the currently available processScope 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 processScope
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" and "height".

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.


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 abstract java.lang.String getOutputMode()
Returns the "output mode" - printable, etc.


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

public abstract java.lang.String getOracleHelpServletUrl()
Return the URL to an Oracle Help for the Web servlet.


getHelpTopic

public abstract java.util.Map getHelpTopic()
Returns a Map that will accept topic names as keys, and return an URL as a result.


getHelpSystem

public abstract java.util.Map getHelpSystem()
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 abstract ChangeManager getChangeManager()
Gets the ChangeManager for the current application.


getRegionManager

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


addPartialTarget

public abstract void addPartialTarget(UIComponent newTarget)
Add a component as a partial target. In response to a partial event, only components registered as partial targets are re-rendered.


addPartialTriggerListeners

public abstract void addPartialTriggerListeners(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(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.


getUploadedFileProcessor

public abstract UploadedFileProcessor getUploadedFileProcessor()

getColorPalette

public abstract java.util.Map getColorPalette()
Returns a Map that takes color palette names as keys, 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 abstract Agent getAgent()
Returns the Agent information for the current context


release

public void release()
Releases the AdfFacesContext object. This method must only be called by the code that created the AdfFacesContext.


attach

public void attach()
Attaches a AdfFacesContext to the current thread. This method is public so the context can be reattached to the current thread which is needed for portal environments.



Copyright © 2003-2007 Oracle Corporation. All Rights Reserved.