OA Framework Tutorial
OA Framework Tutorial
business logic UIX - Java components for representing UI OA Extension Declarative data for UIX Extension to JDeveloper
Resides in database or XML files Formerly known as JRAD Replaces AK (Framework 5.6 and earlier)
Architecture Overview
The model encapsulates underlying data and business logic of the application
The view formats and presents data from a model to the user
Flexible Architecture
UIX
OA Controller
BC4J
Client
Browser
Servlet Engine
Metadata Repository
Data
business logic UIX - Java components for representing UI OA Extension Build declarative data for UIX
Extension to JDeveloper Metadata resides in database or XML files
these technologies
Encapsulation: Layered Reusability Each layer only knows about the layers
below it. This encapsulation allows reuse at any of the layer boundaries.
OA Controllers Application Modules View Objects
Entity Objects DB
Model: Relationships
BC4J objects The objects are related by participating in the same task (for example, a multi-page UI for creating purchase orders) Application Modules provide transaction context Application Modules establish database connections Application Modules may be nested to provide more complex application modules
Entity objects Encapsulate business rules and logic Are used by any program that inserts, updates, or deletes data Provide consistent data validation across all applications May be linked to other entity objects by entity association objects
connection for your transaction You can use this object to:
Create a callable statement for executing PL/SQL functions and procedures Access session-level Applications context information Access OANLServices object for NLS operations
objects (beans) The Java objects are assembled declaratively with the Oracle 10g JDeveloper OA Extension tool
order of the items to determine their position within a page or region UI at runtime.
Regions can inherit properties from other regions The top level of every page is a region with a
'pageLayout' style
Create a region or item in your page. Set its Extends property to point to the desired region or item.
component are also included. Model and controller logic comes with the shared component. Entire page contents (top-level region) can be reused this way.
properties.
Can be used by any type of UI object, including
regions, items, and other attribute sets Used for prompts and similar property values in the E-Business Suite Typically one attribute set per displayable column in applications tables Created in an XML package file
for the item to bind the data source The view instance must be included in the page's root application module (or in one nested underneath the root application module).
10g JDeveloper OA Extension to create pages declaratively. Pages are made up of a hierarchy of regions and items.
The order of the items
Manipulate the UI at runtime Manually initialize data items Intercept and handle user events like button clicks
OAControllerImpl.
OAPageBean is the main OA Framework page
processing class. There are methods in the Controller class to handle GET and POST requests.
method when a browser issues a GET request. The OAPageBean uses this method to build the bean hierarchy. The processRequest method is called for each bean in the page hierarchy. You can override this method on any of the container beans in the hierarchy. The processRequest() method can be used to
Customize page layout at runtime Perform manual data initialization Perform an autoquery
each Bean in the hierarchy (similar to a GET). The OAPageBean then calls processFormData for pages that insert or update data. The processFormData method reads form field data to apply it to underlying view object attributes (invokes attribute- and entity-level validations). The Framework calls the processFormRequest method next. Override the processFormRequest method to add special event handling logic.
for each request received The methods that handle GET and POST requests accept OAPageContext as an argument This object contains parameters from the requesting page It also contains form fields if the request is a POST
Creating a WebAppContext object when a user logs in to a Framework Application Creating a session-based cookie Current responsibility Organization id User characteristics (username, userid, and so on)
Server Tier
AM finds VO
webui
server
Resources
Further reading: OA Framework Developer's Guide: Anatomy of an OA Framework Page OA Framework Javadoc
Summary
The development environment includes many
components, such as JDeveloper, OA Extension, BC4J, and OA Framework Follow the Model-View-Controller design pattern Business logic/data handling (model) is done using BC4J The UI (view) is done using OA Extension and the Repository with UIX OA Framework (controller) wires the data handling to the UI