In this exercise we will create a simple ADF application to access data from database.
I am using soa suite 11.1.1.3 and jdeveloper 11.1.1.3 for this purpose.
Open you jdeveloper and create a new ADF application.

It will come up with following screen and we will create a connection with database.For this purpose we will first create some table in database.

I am using the same table that i have created long back ,it is a customer table and contain two fields name and empid

I just fed this with some random data

Create a connection to this database schema

Say done and go to next step

In Build Business SErvices go to Substeps

Click on Create Entity Objects and Associations

import it to you model and not in view controller

import the table

and the view

done it and close step 3

Finally complete this step;

Save all the poject,Select AppModule and say run you will come up with a new gui like this

We have lot of buttons over there next button to check next data and add button to add new data you can just check that by your own.
NOw we will try to create a jsf page for this.
Select your View Controller and create a new JSF page as shown

Rename you page and say ok

You will come up with a screen like this

now drag and drop the customer view in to start box
choose ADF-Form

Next screen choose Include navigation control

Similarly drag and drop customer table in second column and choose ADF-read only form
and in third choose ADF search form so after this your process should look like this.

Now click any where on page and say run
it will open a web browser
http://127.0.0.1:7101/ADF-ViewController2-context-root/faces/Demo.jspx?_adf.ctrl-state=12czcxgxop_4

This is just a demo i have created to give some familiarity with ADF.
You can design much better things using adf
You can download my project from following location
No comments:
Post a Comment