|
Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3) B25386-01 |
|
![]() Previous |
![]() Next |
The DataBindings.cpx file maps individual pages to page definition files and declares usages of the data control defined in the DataControls.dcx file. (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 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 in a page, JDeveloper adds an entry to the DataBindings.cpx file for that page, if one does not already exist.
Example 5-3 shows a sample 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-3 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"/>
<page path="/app/staff/SREdit.jspx" usageId="SREditPageDef"/>
<page path="/app/staff/SRStaffSearch.jspx" usageId="SRStaffSearchPageDef"/>
<page path="/app/staff/SRSearch.jspx" usageId="SRSearchPageDef"/>
<page path="/app/SRMain.jspx" usageId="SRMainPageDef"/>
<page path="/app/management/SRManage.jspx" usageId="SRManagePageDef"/>
<page path="/app/SRFaq.jspx" usageId="SRFaqPageDef"/>
<page path="/app/SRContact.jspx" usageId="SRContactPageDef"/>
</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"/>
<page id="SREditPageDef"
path="oracle.srdemo.view.pageDefs.app_staff_SREditPageDef"/>
<page id="SRStaffSearchPageDef"
path="oracle.srdemo.view.pageDefs.app_staff_SRStaffSearchPageDef"/>
<page id="SRSearchPageDef"
path="oracle.srdemo.view.pageDefs.app_staff_SRSearchPageDef"/>
<page id="SRMainPageDef"
path="oracle.srdemo.view.pageDefs.app_SRMainPageDef"/>
<page id="SRManagePageDef"
path="oracle.srdemo.view.pageDefs.app_management_SRManagePageDef"/>
<page id="SRFaqPageDef"
path="oracle.srdemo.view.pageDefs.app_SRFaqPageDef"/>
<page id="SRContactPageDef"
path="oracle.srdemo.view.pageDefs.app_SRContactPageDef"/>
</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>