Created
May 28, 2012 15:11
-
-
Save donatasnicequestion/2819650 to your computer and use it in GitHub Desktop.
Base generic implementation of ADF flow scoped bean data control.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nicequestion.donatas.adf; | |
import oracle.adf.view.rich.context.AdfFacesContext; | |
/** Base generic implementation of ADF flow scoped bean data control. | |
* | |
* Note: specific design and naming convention is applied: | |
* the type T must be defined as managed bean (name flowController, scope pageFlow) | |
* in a bounded task flow definition. | |
* | |
* Example definition for the type com.nicequestion.donatas.controller.SampleFlowController: | |
* | |
* <managed-bean-name>flowController</managed-bean-name> | |
* <managed-bean-class>com.nicequestion.donatas.controller.SampleFlowController</managed-bean-class> | |
* <managed-bean-scope>pageFlow</managed-bean-scope> | |
* | |
* @param <T> the type of a flow scoped bean being exposed as data control | |
* | |
* @author Donatas Valys | |
*/ | |
public abstract class FlowScopedDataControlBase<T> { | |
/** Name of the flow controller bean */ | |
public static final String FLOW_CONTROLLER_BEAN = "flowController"; | |
public T getFlowController() { | |
return (T)AdfFacesContext.getCurrentInstance().getPageFlowScope().get(FLOW_CONTROLLER_BEAN); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment