Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g (10.1.3.1.0) Part Number B25947-01 |
|
|
View PDF |
Figure 29-1 shows a sequence diagram of the lifecycle of a web page request using JSF and Oracle ADF in tandem.
As shown in the figure, the basic flow of processing happens as follows:
A web request for http://yourserver/yourapp/faces/some.jsp
arrives from the client to the application server
The ADFBindingFilter
finds the ADF binding context in the HTTP session, and if not yet present, initializes it for the first time.
During binding context initialization, the ADFBindingFilter
:
Consults the servlet context initialization parameter named CpxFileName
and appends the *.cpx
file extension to its value to determine the name of the binding context metadata file. By default the parameter value will be "DataBindings
", so it will look for a file named DataBindings.cpx
.
Reads the binding context metadata file to discover the data control definitions, the page definition file names used to instantiate binding containers at runtime, and the page map that relates a JSP page to its page definition file.
Constructs an instance of each Data Control, and a reference to each BindingContainer. The contents of each binding container are loaded lazily the first time they are used by a page.
The ADFBindingFilter
invokes the beginRequest()
method on each data control participating in the request. This gives every data control a notification at the start of every request where they can perform any necessary setup.
An application module data control uses the beginRequest
notification to acquire an instance of the application module from the application module pool.
The JSF Lifecycle
class, which is responsible for orchestrating the standard processing phases of each request, notifies the ADFPhaseListener
class during each phase of the lifecycle so that it can perform custom processing to coordinate the JSF lifecycle with the Oracle ADF Model data binding layer.
Note: TheFacesServlet (in javax.faces.webapp ) is configured in the web.xml file of a JSF application and is responsible for initially creating the JSF Lifecycle class (in javax.faces.lifecycle ) to handle each request. However, since it is the Lifecycle class that does all the interesting work, the FacesServlet is not shown in the diagram. |
The ADFPhaseListener
creates an ADF PageLifecycle
object to handle each request and delegates appropriate before/after phase methods to corresponding methods in the ADF PageLifecycle
class as shown in Figure 29-2. If the appropriate binding container for the page has never been used before during the user's session, it is created.
The JSF Lifecycle
forwards control to the page to be rendered.
The UI components on the page access value bindings and iterator bindings in the page's binding container and render the formatted output to appear in the browser.
The ADFBindingFilter
invokes the endRequest()
method on each data control participating in the request. This gives every data control a notification at the end of every request where they can perform any necessary resource cleanup.
An application module data control uses the endRequest
notification to release the instance of the application module back to the application module pool.
The user sees the resulting page in the browser.