1. Create Application
1.1. Create a Fusion Web Application using the application wizard. Enter the name as TaskFlowApplication.
1.2. Give default package name for ViewController and the Model project like I have given com.bss.view and com.bss.model.
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.
9. Once you have finished with it will create business units like Entity objects, View object, Association, View Links and the application module.
10. Select all Entity Object from the view project right click à Refractor à move and enter the package name like
12. Repeat this action for association view link also and put them in the respectable with valid package name.
13. Now it’s the turn of view object we have updateable and read-only view objects. But now problem is that how to identify which view object is read-only and which is updateable.
15. Open the View Object go to à Entity Object section it will show no entity object used for read-only view.
21. Go to the Data Model section and remove view object reference from Data Model selection add only updateable view object into TaskFowApplicationAppModule.
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.
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.