Friday Oct 22, 2010

ADF Faces Dynamic Tags - For a Form that Changes Dynamically

I think this is one of the hidden gems of Oracle ADF - a set of components that can display different data each time.
There is a dynamic form and a dynamic table, both read the meta-data of the component you want them to display and create JSF components on the page to show those at runtime.

The following demo shows the basics of how to use them.
We are creating a method in our Application Module that changes the definition of a view object to be based on a provided SQL statement.
Then we bind that VO to our page using the dynamic Form component.
And voila - you'll give the SQL, we'll show the data...

Two notes:
The vo.executeQuery call in the AM method is redundant in this case. The view will be queried when you navigate to the page without this call also.

Dragging a data control as a dynamic table should result in a code that looks like this in our JSF:

If it doesn't make sure you dropped the right dynamic table. You'll see two options in the drop menu with similar name.You need to choose the "ADF Dynamic Table" one.

About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today