When you complete the steps for creating a master form in ADF Swing Form, the form in the Java visual editor should look similar to this:
In the Application Navigator, the View project should look like this when fully expanded:
Double-click DataBindings.cpx, FormPageDef.xml and PanelOrdersView1HelperPageDef.xml to open each file in the overview editor. If necessary, click Overview in the editor window to view the file in the overview editor.
The PanelOrdersView1HelperPageDef.xml file is the page definition file for the Orders edit form panel. It defines the interaction between the UI components added to the form or panel and the business service components in the Model project. A page definition file defines the ADF binding container for each form or panel (page) in an application's view layer. The binding container provides runtime access to all the ADF binding objects for a page.
When you dragged the data collection OrdersView1 from the Data Controls panel and dropped it on the main form to create the master edit form, JDeveloper added the iterator binding OrdersView1Iterator to the edit form panel. An iterator binding references an iterator for the data collection, which facilitates iterating over its data objects. The iterator binding also manages currency and state for the data objects in the collection. The iterator binding does not actually access the data. Instead, it simply exposes the object that can access the data and specify the current data object in the collection.
Each time you add a UI control to a user interface using the Data Controls panel, JDeveloper creates an ADF binding object for that databound control in the page definition file (for example,
OrderDate). Because the master form displays a single data object in the master collection, the panel needs to contain attribute-specific UI components with attribute-level binding definitions. These attributes are bound to the ADF data control through the ADF iterator binding object that manages the currency of the data object for the bound collection. At runtime, the attribute binding objects refer to the iterator binding in order to return data for the current object or to perform an action on the object's data. To see the XML source code for the attribute-level bindings, click
Source to view the
<bindings> element in
<bindings> <attributeValues IterBinding="OrdersView1Iterator" id="OrderId" xmlns="http://xmlns.oracle.com/adfm/jcuimodel"> <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel"> <Item Value="OrderId"/> </AttrNames> </attributeValues> <attributeValues IterBinding="OrdersView1Iterator" id="OrderDate" xmlns="http://xmlns.oracle.com/adfm/jcuimodel"> <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel"> <Item Value="OrderDate"/> </AttrNames> </attributeValues> ... </bindings>
The FormPageDef.xml file is the page definition file (ADF binding container) for the main form. When you dragged the data collection OrdersView1 from the Data Controls panel and dropped it on the main form to create the master edit form, JDeveloper also added the page executable view_PanelOrdersView1HelperPageDef to the main form. When the application runs, the binding container of the main form instantiates. To access objects in the panel added to the main form, the main binding container instantiates the binding container represented by the page executable.
The DataBindings.cpx file defines the ADF binding context for the entire application and provides the metadata from which the ADF binding objects are created at runtime. The binding context is a container object that holds a list of available data controls and data binding objects. It maps individual pages to the binding definitions in the page definition files and registers the data controls used by those pages.
The first time you dropped a data object from the Data Controls panel onto the main form, JDeveloper created the DataBindings.cpx file and added the data control usage AppModuleDataControl. Each time you use the Data Controls panel to insert a databound object to a form or panel, JDeveloper creates a page definition file for the form or panel (if not already created), and then updates the DataBindings.cpx file with the page definition file entry (if not already added). In the example so far, there are two page definition file entries: view_FormPageDef and view_PanelOrdersView1HelperPageDef, representing the main form page definition file and master edit form panel page definition file, respectively.
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,