Pages

Wednesday, July 8, 2009

Oracle ADF

Oracle ADF tools has introduced for simplification of application development.
ADF makes it easy to develop application based on standards. With ADF , developer need not to learn everything about J2EE for design and development. In nutshell ADF provide declarative way to do the things. E.g drag and Drop.

In ADF oracle has introduced around 150 AJAX based control and it’s provide very easy approach to bind the business services /components with user interface.

ADF has very rich Client Components and it offers
Rich Internet Applications
Rich enterprise applications
ADF faces
150+ Ajax controls
Data visualization components

Tuesday, July 7, 2009

ADF Navigation List to update the Page

Navigation List in ADF Page is a list that when updated will actually update/refresh another part of page.

Test case – we have an application to capture the details from credit card statements and then prepare Monthly Budget (Budget has Header, lines and Spending category).
In this example, I will create a VO with the Budget category and Lines and then design a Page that will show all the expenses for a particular category for all existing budgets. Whenever user change the category name , underline page will be refreshed to show the detail of the newly selected category.

Steps
Open Oracle Jdeveloper (Jdev11g).
1. Select New application.
2. Select the template Fusion Web Application (ADF) and Wizard will help you to create TWO projects.


1.Model
2.View Controller.

Model is for Data Control and ViewController for UI.

Oracle ADF Master Detail Page

In this blog I will provides details about ADF Master detail Page, plus how to drop graph UI on Page.

Test case – we have an application to capture the details from credit card statements and then prepare Monthly Budget and compare Actual Amount Vs Allocated Account for each Spending category, plus display Bar Chart for Allocated amount Vs Actual Amount for each Category.

In this blog I will explain how to design Master Detail Page , plus how to add graph Component.
Components for this example
Database table
budget_header
budget_lines.
budget_categories

Steps
1.Open Oracle Jdeveloper (Jdev11g).
2.Select New application.
3.Select the template Fusion Web Application (ADF) and Wizard will help you to create TWO projects.
A. Model
B. View Controller.

Model is for Data Control and ViewController for UI.
In Model Project1. Design the Business Services by selecting categories > business tier >ADF Business components >“Business Components from table” and Wizard will help you to create Business Components..
2. Complete Database connection Setup.
3. Select the budget_header, budget_lines and budget_categories table and create Entity Object (EO), Updatable view (VO) and Application Module (AM) .4. Define view links between these 3 Vos.
5. Creation of Application Model will exposed all the Vos to client, and they will appear under Data Control.
6. Save your Work.

Sunday, July 5, 2009

How to export ADF table data into excel Sheet.

Oracle ADF provides lot of utilities and controls. Among them is how to export data from ADF table to Excel Sheet.
In my example I am taking case to add this in Menu Item.

Following are steps to do that.
  • Add Toolbar , Menu and Menu Item to your ADF Page.
  • Give a meaningful name to your Menu Item.
  • Add Table control.
  • From "Component Palette" go to "Operation" and drag “Export Collection Action Listener” and drop it over your Menu Item.
  • In the Popup “Insert Export Collection Action Listener” enter value for table you want to export in “ExportedId” and “Type” as shown below.

Saturday, July 4, 2009

How to Create LOV in JSF Page (Java /SOA)

In this blog I will explain in details how to create LOV on JSF Page.
Test case – In this example, I will create a VO on STATEMENT_LINES(BgStatementLinesView). One of attribute of this VO is Budget category_id.I will create another VO on BUDGET_CATEGORY(BgBudgetCategoryView) , this VO has attributes
1.Category ID
2.Category Name.
Finally I create LOV that will display category Name and category ID and attach that to the category_id attribute of BUDGET_LINES.
Steps1.Open Oracle Jdeveloper (Jdev11g).
2.Select New application.
3.Select the template Fusion Web Application (ADF) and Wizard will help you to create TWO projects.
Model
View Controller.
Model is for Data Control and ViewController for UI.In Model Project Design the Business Services by selecting categories > business tier >ADF Business components >“Business Components from table”.

Thursday, July 2, 2009

How to pass Parameters between ADF Pages. (SOA)

Test case – How to pass parameter between ADF Pages.we have an application to capture the details from credit card statements and then prepare Monthly Budget (Budget has Header, lines and spending category).
In this example,
1. I will create a Master – Detail Page based on the Budget Header and Lines. I will call it Budget detail page,
2. Create another page that will just Display the
a. Buget ID
b. Budget Name
c. Process flag. I will call it Budget Page.
3. At Run time, I open Budget Page (Display Budget Details in Table) and click Budget ID, and it will open Budget detail page with all the details of budget whose ID I have selected.

Oracle Jdev ADF Bounded Task flow

What is Bounded Task flow - As name says these are the task flows with well-defined boundary.
They have activities of type -View, Router, Method call , task flow call and return etc.

Some of Important characteristics of bounded task flows are
1.Single point of entry & zero or more exit points.
2.Use as region on a page with Page Fragments.
3.You can pass parameters to bounded task flows.
4.It must be called to invoke it etc

There are 2 methods to create bounded task flow
Initially create bounded task flow flow with pages and then convert into fragments after testing pages completely. Please note that you cannot run individual fragments itself.
Create unbounded task flow and then extract part of it as unbounded task flow.

Jdev provide us option to convert Bounded task flow with pages into Bounded task flow with fragments and vice – versa in single click of mouse.

Application of Bounded task flow –
As set of pages and Other activities in a large application.
As a region, providing navigation between page fragments in a single containing page.
With a modal dialog box, launched from a page.

In this example, I will explain how a Unbounded task flow Page work.
For my test case I have design a JSF Page with Panel Accordin (with 2 Panels).
Panel 1 has simple Button that calls Unbounded Task flow
Panel 2 has bounded task flow with 3 fragments along with Train Control.

Here, I will discuss unbounded task flow only.


Create one Unbounded task flow as shown below




Create Bounded task flow “Stat-task_flow_definition.xml: as shown below
web Tier > JSF Page > ADF Task Flow).





Uncheck "Create with page Fragments", as we canot run the Fragments for testing.We can Run only Pages.
Check "Create Train"


Drop "view" component from component pallete into task flow.Since this is First page , it will work as Default Page.Default page is always surrounded by GREEN Circle.




Drop other required pages.Since we have checked the checkbox "Create train", JDEV automatically create train beteen pages.

After you drop all pages , Drop the Return Activity.


Once all components for bounded pages droped on task flow, create the pages, by double -click the page .It will create .jspx file.

'

Once Pages are readt , Drop the train components from component pallete.
There are 2 types of train components
1.Train
2.train Buttom bar.

In my example I will display both


Drop train component for each page.



Drop train component for each page.



Drop train component for each page.



Once all pages are tested , convert them in page fragments as shown below.



Page Fragrements will stores with extension jsff.



Page Fragments conversion.


You can convert back fragents into Pages , as shown below.


Go to adfc-config.xml and design Page "Taskflows.jspx", as shown below.
Drag "Panel Accordin" component on Taskflowx.jspx.
In panel Accordin, Create 2 panel
1. Unbounded &
2. Bounded.
In Unbounded Panel drop a button to cal unbounded taskflow
In Bounded Panel Drop the bounded task flow as region.



Unbounded Task flows to be called from Taskflows.jspx.



Bounded task flow droped as region on "taskflows.jspx".


Bounded task flow droped as region on "taskflows.jspx".



Run "taskflows.jspx".





Run "taskflows.jspx".


Run "taskflows.jspx".


Run "taskflows.jspx".

Fusion.