The blog for hints & tips about Oracle Application Development Framework and Mobile Application Framework

  • ADFc
    April 18, 2012

Task Flow navigation using QueueActionEventInRegion on ADF Region

Frank Nimphius
Master Principal Product Manager

A common requirement in Oracle ADF is to perform navigation within an ADF region triggered by the parent page. While contextual event is one option to perform this task, the queueActionEventInRegion method exposed on the RichRegion instance is another. The queueActionEventInRegion performs navigation following control flow cases defined for the current view exposed in the region. Control flow cases can be flows that are defined from the view activity to a next activity or wild card control flow cases.

The easiest way for developers to access the RichRegion instance of an af:region tag is to use its Binding property and point it to a managed bean. Once you have a handle to the RichRegion, you can perform navigation from any event raised on the parent view (e.g. menu items action, command button action, value change events etc.)

//process navigation
public String navPickerAction() {
//get selected navigation option
  String navigationCase = this.currentNavOption;
  RichRegion region = this.findRegionById("adfRegion1");
                                  null, null,false, 0, 0, PhaseId.INVOKE_APPLICATION);    
  return null;
//Create Method expression   
private MethodExpression createMethodExpressionFromString(String s){
  FacesContext fctx = FacesContext.getCurrentInstance();
  ELContext elctx = fctx.getELContext();
  ExpressionFactory exprFactory = fctx.getApplication().getExpressionFactory();
  MethodExpression methodExpr = exprFactory.createMethodExpression(
                 new Class[]{}); 
  return methodExpr;

Another useful method on the RichRegion instance is the ability to peek into the region for control flow cases defined for the current view. The following code reads the control flow cases that are defined for a view in a region to build a list of SelectItem for use in an af:selectOneChoice

//read the navigation case list from the region capabilities
public ArrayList<SelectItem> getNavlist() {
   RichRegion region = this.findRegionById("adfRegion1");
   Set<String> capabilities = region.getRegionModel().getCapabilities();
   navlist = new ArrayList<SelectItem>();
   for(String navcase : capabilities){           
     SelectItem item = new SelectItem();
  return navlist;

The JDeveloper sample workspace you can download at the end blog article contains implementations for all RichRegion methods: queueActionEventInRegion, getCapabilities and RegionNavigationListener


The select one choice in component in the sample always shows the control flow cases that are defined for the current view in the ADF Region (just for fun, you may want to add some wild card navigation flows in the task flow and then re-run the application to see that the control flow cases are dynamically looked up). Using the Region Navigation Listener, navigating the region using the "Go to Employees" button on the view will update the select one choice component in the parent view.

Get the sample application from here and make sure you configure the database connect to point to the HR schema of your local Oracle database.

Download Sample

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.