Pages

Friday, October 28, 2011

Playing with ADF Task Flows in OEPE 11.1.1.8


Oracle released the Oracle Enterprise Pack for Eclipse 11g R1 (11.1.1.8, New October 2011 ) which supports ADF Rich Faces with ADF Task Flow development. To see all the new features you can go this page for all the ADF or Oracle Cloud feature list.

In this blogpost I will show you some steps how to make your own ADF Web application in OEPE.

Before you can start you should know that the ADF application in OEPE uses JPA as model ( eclipselink), ADF BC can be used but only on runtime and you should already have WebLogic PS3 or higher installed ( together the ADF runtime option).

This OEPE release does not have ADF wizard for ADF BC or for ADF Datacontrols but the support for ADF Task Flows is a big step forward.

Let's start.
Start with a new Oracle ADF Application

Add a new WebLogic runtime, define your WebLogic home and run the domain wizard to create a new ADF enabled domain. Make sure you add the JRF option to the domain.


You should use JPA as a model project with Oracle ADF 11g JPA Project as the configuration.



This will create 2 projects, Model and AdfGuiWeb and 1 ear deployment called AdfGui.


Create a JSP File which will be our start page.


Select the location for the JSPX page

Choose for ADF Rich Faces Page , Basic xhtml

Open the adfc-config.xml and drag the jspx page to the diagram, this will create a new view.


Create a new ADF Fragment Task Flow which will hold the department fragments


Select the location.

The fragment option should be enabled.


Create a new JSP page which will be our fragment page, called department.jsff


Now choose ADF Rich Faces Page Fragment

Open the departments TF and drag this fragment to this Bounded Task Flow.



Now we can go the model project and delete the model project. OEPE does not support ADF Datacontrol generation, so we will skip this for the demo.

Now you are able to run the JSPX page. Select the startView.jspx and right click Run As -> Run on server.

After a successful run we can add an outputtext to the page and the fragment


Now drag the department Task Flow to the jspx start page and select Region. This will create the ADF binding pagedef file.



We can open the pagedef file and add your own bindings.



Or open the Data Palette window which shows you the available bindings



At last open the project options to enable the adf.oracle.domain.webapp shared libraries


Now you can run the start page with the Bounded Task Flow fragment.


As an extra you can also add some data to the page by fixing the Model project.
First add a database connection to the model project
Add JPA entitities from tables
Add a connection to the persistence.xml

Add Data Model Components to the Model project. This will create a managed bean for the JSF page and an EJB Session bean for the entities

EJB Session Bean


JSF bean


the managed bean code

The Data Pallette, drag and drop the FindAll method to the fragment page


And the result.

1 comment: