Oracle ADF Quick Handy Reference
Oracle ADF Quick Handy Reference
JDeveloper
Controller ViewController/
JSF/ADFc/Taskflow Struts ADFdi
User Interface
Project
Model (JSR227) ADFm Model
Data
Services
Relational Data XML Data Legacy Data Packaged Apps
Types of Objects of ADF BC
Service Layer
Data Model HRSystemAM
EmployeeBy applyManagerVO Application Module
Department1 Employee3 Email1 Criteria() with View Object
Components
Data Model
Business Services
DepartmentVO Employee EmployeeBy View ObjectsXML
Row Set EmployeeVO Java
Iterator EmpDeptFkVL SummaryVO EmailVO and View Links
Business Domain
Components
DepartmentEO EmployeeEO XML Entity Objects
Java
EmpDeptFkAS and Associations
JDeveloper
3. Managed bean accesses J2EE UI ComponentTree ADF Faces Components JSF Components ADF Faces Swing Component
persistence layer
Expr. Language
1. EL accesses “bindings” Controller
object to value bind UI ADF “binding” object Managed Bean Struts ADFdi
components
2. ADF “bindings” object is set Model
through ADF Filter in web.xml (JSR227) ADF Binding Container / ADF Bindings
3. Bindings object accesses ADF Data Controls ADF Model /Binding Context /Data Binding
ADF Binding container, which
then accesses DataControl Business
Services ADF BC J2EE Persistence Toplink EJB POJO Portlet XML BI
4. Business Services provide
access to various data sources
Data Relational Data XML Data Legacy Data Packaged Apps
Services
Functionalities of ADF Faces
200+ featured Rich UI Components Parameter Passing (Lesson 16)
Internationalization (Lesson 11) Partial Page Rendering (Ajax support)
Skinning (Lesson 11) (Lesson 16)
Active Geometry Management (L 12) Event and Listener Handling (L 17)
Advance Page Flow and Task Flow Managed and Backing Beans (L 17)
(Lesson 13) Enhanced Lifecycle (Lesson 17)
Navigation (Lesson 14) Drag and Drop Data Binding (L 18)
Accessibility (Lesson 14) Advance Databound Search Capability
Reusability using Templating and (Lesson 19)
Declarative Component (Lesson 15) Transaction Management (Lesson 20)
Memory Scopes (Lesson 16) ADF Model support (Lesson 21)
ADF Faces Functionality: ADF Faces Components
Layout Components: (L 12) Output, Input, LOV, etc.
Headers, Layout, Grouping, Spacing, etc. Data Views: (L 18)
Navigation Control Components: (L14) Table, Tree, List, Carousel, Calendar, etc.
Button, Link, Train, Navigation, etc. Advance Data Visualization
Menu and Toolbar explorer-type Components (L 18)
containers: (L 14) Chart, Graph, Gauge, NBox, Pivot Table,
Menu, Toolbar, Toolbox, etc.
Map, Gantt, Timeline, Hierarchy Viewer,
Sunburst, Diagram, etc.
Secondary Windows Layout: (L 14)
Data Query Components (L 19)
Popup, Dialog, Window, etc.
Query and Quick Query
Text and Selection Components: (L18)
ADF Faces Functionality: ADF Life Cycle Phases
Describing Types of Events
Action events
Occur when a command component is activated, such as when a user clicks
a button or a link
Return a control flow outcome
Value change events
Occur when the local value of a input component changes, such as when a
user selects a check box
Are used for managing UI elements
Phase events
Execute as part of the JSF and ADF life cycle
Can be used to augment standard behavior
Types of Event Listeners
ActionListener
Fired by submit buttons, image maps, and hypertext links with attached JavaScript
<h:commandButton value="..." .../>
<h:commandButton image="..." .../>
<h:commandLink .../>
Automatically submit the form
ValueChangeListener
Fired by combo boxes, checkboxes, radio buttons, textfields, and others
<h:selectOneMenu .../>
<h:selectBooleanCheckbox.../>
<h:selectOneRadio .../>
<h:inputText .../>
Do not automatically submit the form
Phase Listener
Execute custom functions at a specific time during the request
processing lifecycle
getPhaseId is called by the JSF framework to register the custom
PhaseListener
PhaseListener is registered in faces-config.xml
public class HRLifeCycleListener implements PhaseListener{
public PhaseId getPhaseId() {
return PhaseId.ANY_PHASE;
}
public void beforePhase(PhaseEvent event) {
System.out.println("START PHASE " + event.getPhaseId());
}
public void afterPhase(PhaseEvent event) {
System.out.println("END PHASE " + event.getPhaseId());
}
}
ADF Binding Layer
View
ADF Faces Defines all the bindings for a page by
connecting UI components to data or
Controller actions and data control
Created automatically when a data-
bound component is added to a page
Business …
Services ADF BC Application Module/ Services
Types of Bindings: Source View
View
<af:inputText value=“#{bindings.DepartmentName.inputValue}” label =“#{bindings.DepartmentName.hints.label}”
ADF Faces/ JSF/ JSFF/ JSPX
Model
(JSR227) ADFm /Binding Context
<executables> Binding Container /
<iterator id="Department1Iterator" /Data Binding
Bindings
DataControl="HRSystemAMDataControl"
Binds="Department1"/>
</executables>
<bindings>
<attributeValues IterBinding="Department1Iterator“ id="DepartmentName">
<AttrNames> <Item Value="DepartmentName"/> </AttrNames>
</attributeValues> ...
</bindings>
Data Control
Business
Services ADF BC Application Module/ Services
ADF Configuration and Metadata Files
View * Denotes multiple files of
<pagename>.jsf /.jspx*
adfc-config.xml trinidad-config.xml
ADF Configuration Files --> Dotted lines indicate
adf-settings.xml <task-flow-definition>.xml references to objects in
Presentation Layer
JDeveloper
Data Binding Files adfm.xml
Model
adf-config.xml
(JSR227)
Binding Container / Bindings <pagename>PageDef.xml*
ViewController/ User
Interface Project
Data Control DataControls.dcx (<ViewController>.jpr)
Data Control
Model
(JSR227) <pagename>PageDef.xml* adfm.xml
<pageDefinition> <MetadataDirectory> …
<executables> <DataBindingRegistry path=".../DataBindings.cpx"/>
<Iterator id=“<voname>Iterator” Binds=”<voname>”/> … </MetadataDirectory>
</executables>
<bindings> DataBindings.cpx
<… <IterBinding=“<voname>Iterator”>… /> … <Application >
</bindings > <pageDefinitionUsages>
</pageDefinition> <page id="<pagename>PageDef" path=“<pkgname>“/>…
</pageDefinitionUsages>
<dataControlUsages>
<BC4JDataControl id=“<amname>“ Configuration=“<AM>Local”…/>
</dataControlUsages>
</Application>
Business bc4j.xcfg
Services <ApplicationModuleName>.xml <BC4JConfig>
<ViewUsage Name=“<voname>” ViewObjectName=“<ViewObject>”/> <AppModuleConfigBag> <AppModuleConfigname=“<AM>Local”>…
</BC4JConfig>
Class Files in Programmatic Approach
Value bindings oracle.adf.model.binding.DCControlBinding Action bindings oracle.binding.OperationBinding
Model Attribute binding Operation binding
(JSR227) List binding valb = bctr.getControlBinding(valuename); oprb = bctr.getOperationBinding(oprName);
Method binding
Table binding 0..*
Tree binding
* 1 *
Iterator bindings oracle.adf.model.binding.DCIteratorBinding 0..*
Iterator
itrb = bctr.findIteratorBinding("ViewObject1Itr");
Method iterator
Accessor iterator *
Variable iterator
1 1
oracle.adf.model.binding.DCBindingContainer
bctr = bctx.getCurrentBindingsEntry(); 1 Binding Container / Bindings
* 1 1
* oracle.adf.model.binding.DCDataControl
Data Control
dc = bctr.findDataControl(“MyAMDataControl”);
1 oracle.adf.model.BindingContext
bctx = BindingContext.getCurrent(); ADFm /Binding Context /Data Binding
ADF Binding Class Hierarchy contd…
Prefix Package
DC* oracle.adf.model.binding
JU* oracle.jobo.uicli.binding
Others oracle.adf.model or
oracle.binding