Creating ADF Workspace
From menu choose “File->New->Application”.
From “New Gallery” window choose “ADF Fusion Web Application”
Now the wizzard starts. Fille necessary informations like: Application Name, Directory and Default Package Prefix.
Go “Next”.
Basic ADF application workspace contains two projects – Model and ViewController.
Model is responsible for:
- access to data layer ie. Database(bc4j, JPA) or Webserices
- business logic
- validations
- publishing API(ApplicationModules) for ViewController.
Ok let’s create Model project. Choose the name and location. Then go “Next” and set default package for project.
Now it’s time to define ViewController project.
ViewController is responsible for:
- UI
- contoll flow of application
- security
The configuration is similar as model project.
On the last step you can choose build tool for your project. At this moment select Default option.
Go finish and wait for creating project.
After creator finish you will see Application Overview page. There is many usefull tabs on the page.
- Checklist – presents typical application design process. You can find links to tutorials and documentation.
- Others – summary of each group. It contains information about errors and broken audit rules.
Creating first page
Double Click on adfc-config.xml in “Applications” view. This file called Unbounded Task Flow and it’s entry application point. Any activity droped to diagram if public accessibe.
OK, let’s add some public asscessible page to controller. To do this just drag and drop View Activity from Compoenets palete to unbounded Task Flow diagram.
Set the name of new created Activity to “helloWorldView”.
Activity is only placeholder (in this case for page). For create page just double click on Activity.
On creator page:
- ensure the name is correct “helloWorldView”
- directory is set to “public_html”
- choose between Facelets or JSP XML (Facelest is default)
- Choose one column layout with constnt height topbar and dynamic size content.
- Click OK for create
Designig helloWorld view
Double Click on helloWorldView.jsf (1) in “Applications” manu for open page designer.
As you can see there is:
- (2) designer window
- (3) switch between designer/source/history of the file/binding layer
- (4) structure window – you can see componente relation in it
- (5) component palete
- (6) property inspector – just select some componet to change propetrties.
Let’s add some text to ous page.
- From compoenent menu drag Output Text(1) and drop it inside content cell(2).
- select newly created element and change Value propety to “Hello World” in property inspector(3).
Running ADF Application on Integrated WebLogic Server
Our page is ready. Let’s test it.
- (1) Go to adfc-config.xml(1).
- (2) Select helloWorld Activity
- (3) From right click menu choose Run.
If WebLogic Server is down, it will start automatically. Your application appears in default browser.
Well done!