Skip to main content

Dynamic Tab Functionality

I followed a recent blog from Andrejus Baranovskis on a Dynamic Tab Functionality. Actually this functionality is very similar to Dynamic Region Functionality. An example of dynamic region can be found here.

To summarize how to implement dynamic region functionality:

1. create several bounded task flows that you wish to be a member of the dynamic region.

2. drag the task flow you wish to be displayed by default into the region on a JSF page, and choose "dynamic region" tag, you will be asked to set a bean to handle the regions switch.

3. drag the other task flow to the region you want to control the region switch (like the navigation panel), and choose "dynamic link" and choose the dynamic region you created in step 2 (the name is "dynamicRegion1" by default). Jdeveloper will create the codes in the bean to handle the region switch when you hit any of the command links you created in this step.

For Dynamic Tab Functionality, the steps are:

1. drag a bounded task flow into the "region" part. choose static region instead of dynamic region.

2. create a bean to handle the dynamic tab functionality. The codes are:

   private void _launchActivity(String title, String taskflowId, boolean newTab) {
        try {
            if (newTab)  {
                TabContext.getCurrentInstance().addTab(title, taskflowId);
                }
            else {
                TabContext.getCurrentInstance().addOrSelectTab(title, taskflowId);
                }
        } catch (TabContext.TabOverflowException toe) {
                toe.handleDefault();
            }
        }

Comments

Unknown said…
I need a sample example app where I can use dynamic tab functionality without Oracle Dynamic Tab shell Template.
Plesae help me...
-----rajib.saha.jobs@gmail.com