Dynamic Tabs in ADF

  • First we have to create Departments and Employees(EO's,VO's,AM)
  • Create Two task-flows ( Departments and Employees
  • Creating JSPX page in adfc-config.xml
  • Now Create to take "Oracle Dynamic Tabs Shell" (Max 15 tabs Only)

  • In page template we have navigation facet, in that drag drop two links from component palette , for that link create ActionListener to write the java code in that.                                                           
  • public class launcher {
        public void openDepartmentsAsMain(ActionEvent actionEvent){
            try{
                TabContext.getCurrentInstance().setMainContent("/WEB-INF/dept-task-flow#dept-task-flow");
            } catch (TabContext.TabContentAreaDirtyException e) {
            }


        }
        public void closeCurrentTab(ActionEvent actionEvent){
            TabContext.getCurrentInstance().removeCurrentTab();
        }
        public void openDepartmentsTab(ActionEvent actionEvent){
            try{
                TabContext.getCurrentInstance().setTabsRendered(true);
            TabContext.getCurrentInstance().addTab("Departments","/WEB-INF/dept-task-flow#dept-task-flow");
            } catch (TabContext.TabOverflowException e) {
            }
        }
        public void openEmployeesTab(ActionEvent actionEvent){
            try{
                TabContext.getCurrentInstance().setTabsRendered(true);
                TabContext.getCurrentInstance().addTab("Employees","/WEB-INF/emp-task-flow#emp-task-flow");
                } catch (TabContext.TabOverflowException e) {
                }
            }
        }

  • output

Comments

  1. not under stood please post clearly with more screen shots

    ReplyDelete

Post a Comment

Popular posts from this blog

Programmatically invoke a Popup to create a new row.

POJO(Plain Old Java Object) - Editable Data - DataControl.dcx