| Oracle® Application Development Framework Developer's Guide 10g (10.1.3.1.0) Part Number B28967-01 |
|
|
View PDF |
The DataBindings.cpx file maps individual pages to page definition files and declares which data controls defined in the DataControls.dcx file are being used by the application. (For information about the DataControls.dcx file, see Section 3.10.2, "Understanding the Data Control Files".) The DataBindings.cpx file defines the Oracle ADF binding context for the entire application and provides the metadata from which the Oracle ADF binding objects are created at runtime.
The first time you use the Data Control Palette to add a component to a page in an application, JDeveloper automatically creates the DataBindings.cpx file in the view package of the Application Sources directory of the view project. Once the DataBindings.cpx file is created, JDeveloper adds an entry for the first page. Each subsequent time you use the Data Control Palette to add a component to a page, JDeveloper adds an entry to the DataBindings.cpx for that page, if one does not already exist.
Example 5-2 shows the DataBindings.cpx file for the SRDemo application. The pageMap element maps each JSF page to its corresponding page definition file. The pageDefintionUsages element identifies each page definition file in the application. The dataControlUsages element identifies the data controls being used by the binding objects defined in the page definition files. For more information about the elements and attributes in the DataBindings.cpx file, see Appendix A, "Reference ADF XML Files".
Example 5-2 DataBindings.cpx File
<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://xmlns.oracle.com/adfm/application"
version="10.1.3.35.65" id="DataBindings" SeparateXMLFiles="false"
Package="oracle.srdemo.view" ClientType="Generic">
<pageMap>
<page path="/app/SRList.jspx" usageId="SRListPageDef"/>
<page path="/app/SRCreate.jspx" usageId="SRCreatePageDef"/>
<page path="/app/SRCreateConfirm.jspx" usageId="SRCreateConfirmPageDef"/>
...
</pageMap>
<pageDefinitionUsages>
<page id="SRListPageDef"
path="oracle.srdemo.view.pageDefs.app_SRListPageDef"/>
<page id="UserInfoPageDef"
path="oracle.srdemo.view.pageDefs.headless_UserInfoPageDef"/>
<page id="SRCreatePageDef"
path="oracle.srdemo.view.pageDefs.app_SRCreatePageDef"/>
<page id="SRCreateConfirmPageDef"
path="oracle.srdemo.view.pageDefs.app_SRCreateConfirmPageDef"/>
...
</pageDefinitionUsages>
<dataControlUsages>
<dc id="EmailService" path="oracle.srdemo.emailService.EmailService"/>
<dc id="SRDemoFAQ" path="oracle.srdemo.faq.SRDemoFAQ"/>
<dc id="SRAdminFacade" path="oracle.srdemo.model.SRAdminFacade"/>
<dc id="SRPublicFacade"
path="oracle.srdemo.model.SRPublicFacade"/>
</dataControlUsages>
</Application>