About the ADF-Specific Project Files

When you build an Oracle ADF&ndashbased application using the JDeveloper design time tools, JDeveloper generates project files specific to Oracle ADF, as shown in the following figure.

Oracle ADF project files

Files in the Model Project

The DataControls.dcx file is created when you register data controls on the business services. Note that this file is not generated for the Oracle ADF Business Components and Oracle ADF TopLink Mappings data controls. In those cases, the data control obtains the metadata directly from the generated services.

The DataControls.dcx file specifies the factory classes for a bean registered as an Oracle ADF data control. In the case of EJB, web services, and bean-based data controls, you can edit this file in the Property Inspector to add or remove parameters and to alter data control settings.

Various .xml files are created when you register a bean (for example, an EBJ session bean) as an Oracle ADF data control. The definition file specifies the bean's available attribute, accessors, and collections available for use by the client application. You will modify this file only when an accessor method returns a collection. In this case, it is necessary to specify the return type. Note that in the case of Oracle ADF Business Components, all accessor return types are known and you do not need to manually perform this step.

About the DataControls.dcx File Syntax

In the case of bean-based and web service&ndashbased business services, the DataControls.dcx file appears in the /src/package directory of the model project folder. The Application Navigator displays the file in the model package of the Application Sources folder. When you double-click the file node, the data control description appears in the XML Code Editor. To edit the data control parameters, use the Property Inspector and select the desired parameter in the Structure window.

The following code describes the syntax for a combination of Oracle ADF Business Services, JavaBeans, and web service data controls:




<DataControlConfigs

   id="DataControls"

   xmlns="http://xmlns.oracle.com/adfm" >

   <Contents >

      <DataControl

         id="ClassNameDataControl | AppModuleDataControl | PXWebServiceNameDataControl"

	 

	     <!-- Indicates for the ADF design time the class to use to represent

	         the data control on the Data Control Palette. -->

         SubType="DCBC4J | DCJavaBean | DCWebService"

	 

	     <!-- Indicates whether the data control for the business service 

	          supports query-by-example. This enables the find operation choice 

	          in the Data Control Palette for this data control and the associated 

	          services. Not used by ADF. -->

         SupportsFindMode="true | false"

	 

	     <!-- Indicates whether the data control for the business service

	          supports transaction semantics. This enables commit and rollback

	          operations on the data control. -->

         SupportsTransactions="true | false"



	     <!-- Oracle ADF Business Components definitions, including the

	          package, the bc4j.xcfg configuration, and the factory class. -->

         Package="model"

         Configuration="AppModuleLocal" >

         FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"



    	 <!-- Standard Bean definitions, including the factory class,

	          the XML definition file, and the bean class file. -->

	     FactoryClass="oracle.adf.model.generic.DataControlFactoryImpl"

         Definition="model.Class1"

         BeanClass="model.Class1" >

      </DataControl>

   </Contents>

</DataControlConfigs>    

Files in the ViewController Project

Various .jsp, .uix, or .java files are the presentation documents of the client application. You lay out the UI in an Oracle ADF application using a visual editor and the Data Control Palette. When you insert a databound UI component into your document, the page will contain binding expressions that access the Oracle ADF binding objects at runtime. You can edit the binding expressions directly in the source code in order to specify runtime behavior using the available properties of the UI component's binding object.

The DataBindings.cpx file is created the first time you open a web page from the Struts Page Flow Diagram in the HTML Visual Editor. The .cpx file defines the Oracle ADF binding context for the entire application. The .cpx file provides the metadata from which the Oracle ADF binding objects are created at runtime. The binding context provides access to the bindings across the entire application. You can edit this file in the Property Inspector to add or remove parameters and to alter the binding container settings.

The pageNameUIModel.xml files are created each time you design a new web page or JClient panel using the Data Control Palette and the Java Visual Editor. These XML files define the Oracle ADF binding container for each presentation document in the client application. The binding container provides access to the bindings within the page. Therefore, you will have one XML file for each databound web page or JClient panel. You may need to edit the binding definitions in this file when you remove bindings expressions from your presentation documents.

Note: You cannot rename the pageName UIModel.xml file in JDeveloper, but you can rename the file outside of JDeveloper in your MyWork/ViewController/src/view folder. If you do rename the pageNameUIModel.xml file, you must also update the DataBindings.cpx file references in the <Containee> id and FullName attributes.

About the UIModel.xml File Syntax

The UIModel.xml file appears in the /src/view directory of the view-controller project folder. The Application Navigator displays the file in the view package of the Application Sources folder. When you double-click the file node, the binding container description appears in the XML Code Editor. To edit the binding container parameters, use the Property Inspector and select the desired parameter in the Structure window.

The following syntax was generated for a web page that accesses business service objects MyAttribute1, MyAttribute2, and MyDataCollectionIterator, through their corresponding binding objects:




<DCContainer

   id="PageNameUIModel"

   xmlns="http://xmlns.oracle.com/adfm"

   Package="view"

   

   <!-- Indicates whether find mode should be enabled for the page. -->

   FindMode="false | true"

   

   <!-- Indicates whether to check the currency of the bound collection.

        This ensures that row updates will be applied to the correct row. -->

   EnableTokenValidation="true | false" >

   

   <Contents >

      <DCIterator

         id="MyDataCollection1Iterator"

         Binds="BusinessServiceDataControl.MyDataCollection"

         <!-- Indicates the number of rows to display from the bound collection. -->

         RangeSize="10" >

      </DCIterator>

      <DCControl

         id="MyBusinessServiceName"

         Subtype="DCBindingType"

         IterBinding="MyDataCollection1Iterator" >

         <AttrNames>

            <Item Value="MyAttribute1" />

            <Item Value="MyAttribute2" />

         </AttrNames>

      </DCControl>

 </DCContainer>    

About the DataBindings.cpx File Syntax

The DataBindings.cpx file appears in the /src directory of the view-controller project folder. The Application Navigator displays the file in the Application Sources folder. When you double-click the file node, the binding context description appears in the XML Code Editor. To edit the binding context parameters, use the Property Inspector and select the desired parameter in the Structure window.

The following describes the syntax for a combination of Oracle ADF Business Services, JavaBeans, and web service data controls:




<JboProject

   id="DataBindings"

   xmlns="http://xmlns.oracle.com/adfm"

   

   <!-- Indicates that the components of this project may appear 

         in separate XML files. Not used by ADF. -->

   SeparateXMLFiles="false"

   

   <!-- Used by JClient applications to locate a bc4j.xcfg file. For backwards compatibility. -->

   Package=""

   

   <!-- Indicates whether the ADF bindings use generic classes or JClient-specific classes. -->

   ClientType="Generic | JClient" >

   

   <Contents >

      <DataControl

         id="ClassNameDataControl | AppModuleNameDataControl | PXWebServiceNameDataControl"

	 

	     <!-- Indicates for the ADF design time the class to use to represent

	          the data control on the Data Control Palette. -->

         Subtype="DCBC4J | DCJavaBean | DCWebService"

	 

	     <!-- Indicates whether the data control for the business service 

	          supports query-by-example. This enables the find operation choice in

	          the Data Control Palette for this data control and the associated 

	          services. Not used by ADF. -->

         SupportsFindMode="true | false"

	 

	     <!-- Indicates whether the data control for the business service

	          supports transaction semantics. This enables commit and rollback

	          operations on the data control. -->

         SupportsTransactions="true | false"



	     <!-- Oracle ADF Business Components definitions, including the

	          package, the bc4j.xcfg configuration, and the factory class. -->

         Package="model"

         Configuration="AppModuleLocal" >

         FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"



	     <!-- Standard Bean definitions, including the factory class,

	          the XML definition file, and the bean class file. -->

	     FactoryClass="oracle.adf.model.generic.DataControlFactoryImpl"

         Definition="model.Class1"

         BeanClass="model.Class1" >

	 

	     <!-- Indicates whether the Application Module synchronization will

	          use Batch mode or Immediate mode. -->

         <Parameters >

            <Parameter

               name="Sync"

               value="Batch" >

            </Parameter>

         </Parameters>

      </DataControl>

      

      <!-- References the binding containers to create from the UI Model

           definition files. This allows the .cpx file to create the binding 

           context for the application at runtime. -->

      <Containee

         id="MyPage1UIModel"

         ObjectType="BindingContainerReference"

         FullName="view.MyPage1UIModel" >

      </Containee>

      <Containee

         id="MyPage2UIModel"

         ObjectType="BindingContainerReference"

         FullName="view.MyPage2UIModel" >

      </Containee>

          ...

   </Contents>

</JboProject>    

About the Oracle ADF Bindings
About the Oracle ADF Data Controls
About the Data Control Palette

Specifying a Bean Definition for Accessors that Return a Collection
Refreshing ADF Data Controls After Modifying Business Services

 

Copyright © 1997, 2004, Oracle. All rights reserved.