03 – ADF Hello World Application

Creating ADF Workspace

From menu choose “File->New->Application”.

adf_tutorial_03_hello_world_01

From “New Gallery” window choose “ADF Fusion Web Application”

adf_tutorial_03_hello_world_02

Now the wizzard starts. Fille necessary informations like: Application Name, Directory and Default Package Prefix.

Go “Next”.

adf_tutorial_03_hello_world_03

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.

adf_tutorial_03_hello_world_04

adf_tutorial_03_hello_world_05

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.

adf_tutorial_03_hello_world_06

adf_tutorial_03_hello_world_07

On the last step you can choose build tool for your project. At this moment select Default option.

adf_tutorial_03_hello_world_08

Go finish and wait for creating project.

adf_tutorial_03_hello_world_09

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.

adf_tutorial_03_hello_world_10

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.

adf_tutorial_03_hello_world_11

Set the name of new created Activity to “helloWorldView”.

adf_tutorial_03_hello_world_12

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

adf_tutorial_03_hello_world_13

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.

adf_tutorial_03_hello_world_14

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).

adf_tutorial_03_hello_world_15

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.

adf_tutorial_03_hello_world_16

If WebLogic Server is down, it will start automatically. Your application appears in default browser.

adf_tutorial_03_hello_world_17

Well done!

Facebooktwittergoogle_plusredditlinkedinmail

Leave a Reply