Monday, August 30, 2010

How to use Bounded Task Flow in Application





1.     Create Application



2.     Create Business Components from Tables.

1.         Select the Model project right clicks on the project go to à New à Business tier à ADF business components àBusiness Components using Tables.











10.     Select all Entity Object from the view project  right click à Refractor à move and enter the package name like

15.     Open the View Object go to à Entity Object section it will show no entity object used for read-only view.

16.     Open the view object and go to à Attributes click on the edit button 




3.     Create the create web page:

In this section we will see how to create the taskflow and WebPages.

Here are the steps to create a web page and the task flow.

3.1.   Go to New à Current Project technologies àWeb tier à Jsff àJsf page.



3.2.   Enter the page name as mainPage.jspx and Enter MainPage for manage bean name and class name.

3.3.   Select the page template as Oracle Dynamic Tabs Shell.

3.4.   Create a jsff page with the name of searchPage.jsff inside the fragments package. 


3.5.   Edit Employee Readonly view object and add a search criteria.


3.6.   Drag and drop the search criteria as ADF Query with panel. 

3.7.   Surround with your table with panel collection.

3.8.   Give width for panel collection 100% and change the result id of query control to panel collection.

4.     Create the Task Flow:

In side this section we will how to create the bounded taskflow.

4.1.   Select the view controller project and create the taskflow using New à Web Tier à ADF Task Flow 

4.2.   Enter the taskflow name as EmployeeSearchTaskFlow.xml and place it inside web-inf project.

 

 

4.3.   Drag and drop your jsff page to taskflow.

4.4.   Now your taskflow is ready for use.

5.     Design main page:

As discuss we have created the bounded taskflow, it will require landing page to run. In this section of document we will learn how to create the landing page.

5.1.   For loading the task flow to a page dynamically TaskFlowLoader class is require. Create a java class using.



        5.2   Enter the class name as TaskFlowLoader and package name as com.bss.view.
          package com.bss.view;
          import javax.faces.event.ActionEvent;
          import oracle.ui.pattern.dynamicShell.TabContext;
          /*
           
          * This class is used for loading the taskflow instance programatically to Oracle Dynamic UI Shell           
          Template.
                     
          * */
          public class TaskFlowLoader {
              public TaskFlowLoader() {
                  super();
              }
              /**
               * This method will bind to the link button to load the task flow.
               * @param event
               */
              public void loadSearchTaskFlow(ActionEvent event) {
                  loadTaskFlow("Search Employee Page", "/WEB-          
               INF/EmployeeSearchTaskFlow.xml#EmployeeSearchTaskFlow", false);
              
             }
              private void loadTaskFlow(String title, String taskflowId,
                              boolean newTab) {
                  try {
                      if (newTab) {
                          TabContext.getCurrentInstance().addTab(title, taskflowId);
                      } else {
                          TabContext.getCurrentInstance().addOrSelectTab(title,
                                                               taskflowId);
                      }
                  } catch (TabContext.TabOverflowException toe) {
                      // causes a dialog to be displayed to the user saying that there are
                      // too many tabs open - the new tab will not be opened...
                      toe.handleDefault();
                  }
              }
          }

No comments:

Post a Comment

Thanks for your valuable comment. You comment will go live soon.