Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.controller.faces.lifecycle
Class ADFPhaseListener

`java.lang.Object
oracle.adf.controller.v2.lifecycle.Lifecycle
oracle.adf.controller.faces.lifecycle.ADFPhaseListener`

All Implemented Interfaces:
  java.util.EventListener, javax.faces.event.PhaseListener, java.io.Serializable

public class ADFPhaseListener
extends Lifecycle
implements javax.faces.event.PhaseListener

A Faces phase listener use to bootstrap and execute the ADF PageLifecycle.

This is also a factory to create the FacesPageLifecycle instances. Subclass ADFPhaseListener to provide alternate `FacesPageLifecycle` instance to all web page. Specify your ADFPhaseListener subclass in the faces-config file to replace the oracle.adf.controller.faces.lifecycle.ADFPhaseListener entry.

Since:
  10.1.3
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class oracle.adf.controller.v2.lifecycle.Lifecycle
`Lifecycle.Phase`

Field Summary
`static java.lang.String` | `CurrentViewRootRequestParam` Use to store the current viewRoot on the request map.
`static java.lang.String` | `LifecycleContextRequestParam` Used to store the LifecycleContext on the request map.
`protected oracle.adf.controller.faces.lifecycle.ADFPhaseListener.PhaseInvoker[]` | `phases` Array of PhaseInvoker, one for each phase of the Faces Lifecycle.

Fields inherited from class oracle.adf.controller.v2.lifecycle.Lifecycle
`APPLY_INPUT_VALUES, APPLY_INPUT_VALUES_ID, INIT_CONTEXT, INIT_CONTEXT_ID, listeners, METADATA_COMMIT, PREPARE_MODEL, PREPARE_MODEL_ID, PREPARE_RENDER, PREPARE_RENDER_ID, PROCESS_COMPONENT_EVENTS, PROCESS_COMPONENT_EVENTS_ID, PROCESS_UPDATE_MODEL, PROCESS_UPDATE_MODEL_ID, VALIDATE_INPUT_VALUES, VALIDATE_INPUT_VALUES_ID, VALIDATE_MODEL_UPDATES, VALIDATE_MODEL_UPDATES_ID`

Constructor Summary
`ADFPhaseListener()`

Method Summary
`void` | `afterPhase(javax.faces.event.PhaseEvent event)` Delegate to the PhaseInvoker afterPhase method for each phase based on the phaseId.
`void` | `beforePhase(javax.faces.event.PhaseEvent event)` Delegate to the PhaseInvoker beforePhase method for each phase based on the phaseId.
`protected PageLifecycle` | `createPageLifecycle()` Create and return the default instance of the ADF PageLifecycle to be used with this web application.
`void` | `execute(java.util.Map envMap)` Execute does not do anything in the Faces case since the phases of the ADFLifecycle are triggered by the JSF phases.
`protected java.util.Map` | `getEnvMap(javax.faces.context.FacesContext context)` Initialize the environment map that will be use to create a new LifecycleContext.
`javax.faces.event.PhaseId` | `getPhaseId()` Return the fact that we want to listen to each phase.
`protected boolean` | `isDesignTime()` Utility method to know when we are being used at design time in an IDE.

Methods inherited from class oracle.adf.controller.v2.lifecycle.Lifecycle
`addPagePhaseListener, executePhase, getPagePhaseListeners, removePagePhaseListener`

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

Field Detail

### LifecycleContextRequestParam

    public static final java.lang.String LifecycleContextRequestParam

  Used to store the LifecycleContext on the request map.
  See Also:
    Constant Field Values

### CurrentViewRootRequestParam

    public static final java.lang.String CurrentViewRootRequestParam

  Use to store the current viewRoot on the request map. This is used internaly to detect navigation.
  See Also:
    Constant Field Values

### phases

    protected final oracle.adf.controller.faces.lifecycle.ADFPhaseListener.PhaseInvoker[] phases

  Array of PhaseInvoker, one for each phase of the Faces Lifecycle.

Constructor Detail

### ADFPhaseListener

    public ADFPhaseListener()

Method Detail

### beforePhase

    public final void beforePhase(javax.faces.event.PhaseEvent event)

  Delegate to the PhaseInvoker beforePhase method for each phase based on the phaseId.
  Specified by:
    `beforePhase` in interface `javax.faces.event.PhaseListener`

### afterPhase

    public final void afterPhase(javax.faces.event.PhaseEvent event)

  Delegate to the PhaseInvoker afterPhase method for each phase based on the phaseId.
  Specified by:
    `afterPhase` in interface `javax.faces.event.PhaseListener`

### getPhaseId

    public javax.faces.event.PhaseId getPhaseId()

  Return the fact that we want to listen to each phase.
  Specified by:
    `getPhaseId` in interface `javax.faces.event.PhaseListener`

### isDesignTime

    protected boolean isDesignTime()

  Utility method to know when we are being used at design time in an IDE.

### createPageLifecycle

    protected PageLifecycle createPageLifecycle()

  Create and return the default instance of the ADF PageLifecycle to be used with this web application.

  The base implementation creates an instance of `FacesPageLifecycle`. This method is only called once the first time FacesPageLifecycle is needed, instance is then cached for the lifetime of the application.

### execute

    public void execute(java.util.Map envMap)
                 throws java.lang.Exception

  Execute does not do anything in the Faces case since the phases of the ADFLifecycle are triggered by the JSF phases.
  Specified by:
    `execute` in class `Lifecycle`
  Throws:
    `java.lang.Exception`

### getEnvMap

    protected java.util.Map getEnvMap(javax.faces.context.FacesContext context)

  Initialize the environment map that will be use to create a new LifecycleContext. The Lifecycle context instance itself will not be created until the `INIT_CONTEXT` phase of the Lifecycle.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.