A script-enabled browser is required for this page to function properly.

Reference ADF XML Files

This appendix provides reference for the Oracle ADF metadata files that you create in your data model and user interface projects. You may use this information when you want to edit the contents of the metadata these files define.

This appendix includes the following sections:

About the ADF Metadata Files

Metadata files in the Oracle ADF application are structured XML files used by the application to:

In the case of ADF bindings, you can use the binding-specific editors to customize the runtime properties of the binding objects. You can open a binding's editor when you display the Structure window for a page definition file and choose Properties from the context menu.

Additionally, you can view and edit the contents of any metadata file in JDeveloper's XML editor. The easiest way to work with these file is through the Structure window and Property Inspector. In the Structure window, you can select an element and in the Property Inspector, you can define attribute values for the element, often by choosing among dropdown menu choices. Use this reference to learn the choices you can select in the case of the Oracle ADF-specific elements.

ADF File Overview Diagram

The relationship between the Oracle ADF metadata files defines dependencies between the model data and the user interface projects. The dependencies are defined as file references within XML elements of the files.

Figure: Oracle ADF File Hierarchy Overview for an EJB-based Web Application illustrates the hierarchical relationship of the XML metadata files that you may work with in the Oracle ADF application that uses an EJB session bean as a service interface to JavaBeans and JSF web pages.

Oracle ADF File Hierarchy Overview for an EJB-based Web Application

Navigator showing basic model project.

Oracle ADF Data Control Files

These XML configuration files required in an Oracle ADF application appear in the data model project:

Oracle ADF Data Binding Files

These standard XML configuration files for an Oracle ADF application appear in your user interface project:

Oracle ADF Faces and Web Configuration Files

These XML configuration files required in a JSF application appear in your user interface project:

ADF File Syntax Diagram

Figure: Oracle ADF File Hierarchy and Syntax Diagram for an EJB-based Web Application illustrates the hierarchical relationship of the XML metadata files that you may work with in the web application that uses an EJB session bean as a service interface to JavaBeans. At runtime, the objects created from these files interact in this sequence:

  1. When the first request for an ADF databound web page occurs, the servlet registers the Oracle ADF servlet filter ADFBindingFilter named in the web.xml file.

  2. The binding filter creates a binding context by reading the CpxFileName init param from the web.xml file.

  3. The binding context creates the binding container by loading the <pagename>PageDef.xml file as referenced by the <pagemap> element from the DataBindings.cpx file.

  4. The binding container's prepareModel phase prepares/refreshes all the executables.

  5. An iterator binding gets executed by referencing the named method on the session bean facade specified by the data control factory named in the DataControls.dcx file.

  6. The binding container also creates the bindings defined in the <bindings> section of the <pagename>PageDef.xml file for the mapped web page.

  7. The web page references to ADF bindings through EL using the expression #{bindings} get resolved by accessing the binding container of the page.

  8. The page pulls the available data from the bindings on the binding container.

Oracle ADF File Hierarchy and Syntax Diagram for an EJB-based Web Application

Navigator showing basic model project.

DataControls.dcx

The DataControls.dcx file is created in the /src/package directory of the data model project folder when you create data controls on the business services. There can be one .dcx file for each model project. The .dcx file identifies the Oracle ADF model layer data control classes that facilitate the interaction between the client and the available business service. There will be one data control definition for each data control type used in the project.

The JDeveloper design time maintains path information for the DataControls.dcx file in the adfm.xml registry file located in the model project's META-INF folder. When you create a data control, JDeveloper will automatically update this file.

In the case of EJB, web services, and bean-based data controls, you can edit this file in the Property Inspector to alter data control settings. For example, you can use the .dcx file to customize the global properties of each data control, such as whether to turn on/off sorting. See Table: DataControls.dcx File Metadata for details about the attributes.

The Application Navigator displays the .dcx file in the default package of the Application Sources folder. When you double-click the file node, the data control description appears in the XML Source Editor. To edit the data control attributes, use the Property Inspector and select the desired attribute in the Structure window.

Syntax of the DataControls.dcx File

The toplevel element of the DataControls.dcx file is <DataControlConfigs>:

<DataControlConfigs xmlns="http://xmlns.oracle.com/adfm/configuration"
                    version="10.1.3.35.65" Package="oracle.srdemo.model"
                    id="DataControls">

where the XML namespace attribute (xmlns) specifies the URI to which the data controls bind at runtime. Only the package name is editable; all other attributes should have the values shown.

Figure: Schema Overview for DataControl.dcx displays the toplevel <DataControlConfigs> element. Note that the BaseDataControl element is a placeholder for the concrete data control types. In the SRDemo application, the data control type is the AdapterDataControl.

Schema Overview for DataControl.dcx

Navigator showing basic model project.

Figure: Schema Overview for Adapter Data Control in DataControl.dcx displays the <AdapterDataControl> element that substitutes for the placeholder <BaseDataControlType> element. Note that each business service for which you have created a data control, will have its own <AdapterDataControl> definition.

Schema Overview for Adapter Data Control in DataControl.dcx

Navigator showing basic model project.

The child elements have the following usages:

Table: DataControls.dcx File Metadata describes the attributes of the DataControls.dcx elements.

DataControls.dcx File Metadata

Element Syntax Attributes Attribute Description

<AdapterDataControl>

BeanClass

Fully qualified package name. Identifies the class for which the data control is created. In the case of the EJB session facade, this the session bean


Definition

Identifies the class for which the data control is created. This is used for backward compatibility.


FactoryClass

Fully qualified package name. Identifies the ADF runtime factory class that creates an instance of the data control.


id

Unique identifier. Referenced by the DataBindings.cpx file.


ImplDef

Internal.


SupportsFindMode

Determines whether the data control supports preparing queries with user supplied criteria when preparing ADF iterator binding objects. Default is false for EJB session facade beans. Set to false if you want to globally prevent all iterator-bound web pages in the application from operating in find mode.


SupportsRangeSize

Determines whether the data control supports returning a user-defined number of data objects when preparing ADF iterator binding objects. Default is false for EJB session facade beans.


SupportsResetState

This attribute is deprecated. Determines whether the data control supports resetting the state. Default is false for EJB session facade beans; not supported.


SupportsSortCollection

Determines whether the data control supports data object sorting on the service collection. Default is false for EJB session facade beans; not supported for collections exposed by EJB session facade finder methods.


SupportsTransaction

Determines whether the data control supports create, edit, and delete operations on the business service. Default is false for EJB session facade beans.


SupportsUpdates

Determines whether the data control supports write operations. Default is true for EJB session facade beans.


xmlns

URI used to identify the data control configuration namespace. At runtime, the data control object locates the runtime factory responsible for creating the definition objects for elements in its namespace.

<CreateableTypes> <TypeInfo /></CreateableTypes>

FullName

Identifies the full type name of the Createable type. This element is defined only for those types that have constructors that appear in the Constructors folder of the Data Control Palette

<Source> <ejb-definition /></Source>

ejb-business-interface

The Remote or Local interface that will be used to communicate with this Session bean


ejb-interface-type

Either local or remote.


ejb-name

The EJB's name.


ejb-type

The EJB's type, currently only Session is supported.


ejb-version

Either 3.0, 2.1, or 2.0.


xmlns

This is for internal use only and refers to the schema namespace; this cannot be updated.


Sample of the DataControls.dcx File

Example: DataControls.dcx Sample File shows the syntax for a sample data control definition file. Notice that there are two session beans identified by the AdapterDataControl: SRPublicFacade and SRAdminFacade.

DataControls.dcx Sample File

<?xml version="1.0" encoding="UTF-8" ?>
<DataControlConfigs xmlns="http://xmlns.oracle.com/adfm/configuration"
                    version="10.1.3.35.65" Package="oracle.srdemo.model"
                    id="DataControls">
  <AdapterDataControl id="SRPublicFacade"
                    FactoryClass="oracle.adf.model.adapter.DataControlFactoryImpl"
                      ImplDef="oracle.adfinternal.model.adapter.ejb.EjbDefinition"
                      SupportsTransactions="true" SupportsSortCollection="false"
                      SupportsResetState="false" SupportsRangesize="false"
                      SupportsFindMode="true"
                      Definition="oracle.srdemo.model.SRPublicFacade"
                      BeanClass="oracle.srdemo.model.SRPublicFacade"
                      xmlns="http://xmlns.oracle.com/adfm/datacontrol"
                      SupportsUpdates="true">
    <CreatableTypes>
      <TypeInfo FullName="oracle.srdemo.model.entities.Product"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.ExpertiseArea"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.ServiceHistory"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.User"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.ServiceRequest"/>
    </CreatableTypes>
    <Source>
      <ejb-definition ejb-version="3.0" ejb-name="SRPublicFacade"
                      ejb-type="Session" ejb-interface-type="local"
                      ejb-business-interface="oracle.srdemo.model.SRPublicFacade"
                      xmlns="http://xmlns.oracle.com/adfm/adapter/ejb"/>
    </Source>
  </AdapterDataControl>
  <AdapterDataControl id="SRAdminFacade"
                    FactoryClass="oracle.adf.model.adapter.DataControlFactoryImpl"
                      ImplDef="oracle.adfinternal.model.adapter.ejb.EjbDefinition"
                      SupportsTransactions="true" SupportsSortCollection="false"
                      SupportsResetState="false" SupportsRangesize="false"
                      SupportsFindMode="true"
                      Definition="oracle.srdemo.model.SRAdminFacade"
                      BeanClass="oracle.srdemo.model.SRAdminFacade"
                      xmlns="http://xmlns.oracle.com/adfm/datacontrol"
                      SupportsUpdates="true">
    <CreatableTypes>
      <TypeInfo FullName="oracle.srdemo.model.entities.ServiceHistory"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.User"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.ServiceRequest"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.Product"/>
      <TypeInfo FullName="oracle.srdemo.model.entities.ExpertiseArea"/>
    </CreatableTypes>
    <Source>
      <ejb-definition ejb-version="3.0" ejb-name="SRAdminFacade"
                      ejb-type="Session" ejb-interface-type="local"
                      ejb-business-interface="oracle.srdemo.model.SRAdminFacade"
                      xmlns="http://xmlns.oracle.com/adfm/adapter/ejb"/>
    </Source>
  </AdapterDataControl>
</DataControlConfigs>

Sample of the adfm.xml File

The adfm.xml file is the registry for the data controls in the JDeveloper design time. For instance, the Data Control Palette uses the supplied path to facilitate locating the data controls used in the model project. When you create a data control, JDeveloper will automatically update this file located in the META-INF folder of the data model project.

Example: Data Control Registry Syntax shows the data control registry syntax.

Data Control Registry Syntax

<MetadataDirectory xmlns="http://xmlns.oracle.com/adfm/metainf" 
             version="10.1.3.xx.xx">  
        <DataControlRegistry path="test/model/DataControls.dcx"/>
</MetadataDirectory>

Structure Definition Files

Structure definition files are created to support a data control's structure, and the structure of read-only and updateable attributes and collections.

When you register a session bean as an Oracle ADF data control, an XML definition file is created in the Model project for every session bean. The structure definition file has the same name as the session bean, but has a .xml extension. A structure definition is also created for each EJB entity and TopLink POJO.

Figure: Schema Root for the Structure Definition of a JavaBean shows the toplevel definition for the JavaBean structure definition.

Schema Root for the Structure Definition of a JavaBean

Navigator showing basic model project.

Syntax for the Structure Definition for a JavaBean

The toplevel element of the structure definition is <JavaBean>:

<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="10.1.3.35.83"
          id="<beanname>" BeanClass="oracle.srdemo.model.entities.<beanname>"
          Package="oracle.srdemo.model.entities" isJavaBased="true">

where the XML namespace attribute (xmlns) specifies the URI to which the structure definition binds at runtime. Only the package name is editable; all other attributes should have the values shown.

Figure: Schema for Attribute displays the <Attribute> child element of the <JavaBean> element. It defines the structure definition of a bean attribute.

Schema for Attribute

Navigator showing basic model project.

Figure: Schema for AccessorAttribute displays the <AccessorMethod> child element of the <JavaBean> element. It defines the structure information for an attribute that returns an object.

Schema for AccessorAttribute

Navigator showing basic model project.

Figure: Schema for MethodAccessor displays the <MethodAccessor> child element of the <JavaBean> element. It defines the structure information for a method that returns an object or collection. Note that unlike attribute accessors, method accessors can define parameters.

Schema for MethodAccessor

Navigator showing basic model project.

Table: Attributes of the Structure Definition for a Bean describes the attributes of the structure definition of the bean. Note that each attribute or method specified by the bean, will have its own <Attribute>, <AccessorAttribute>, and <MethodAccessor> definition and each method parameter will have its own <ParameterInfo> definition.

Attributes of the Structure Definition for a Bean

Element Syntax Attributes Attribute Description

<Attribute>

AttrLoad

Internal


DefaultValue

This field is used only in case of variables and ADF Business Components datacontrol. For beans, since the beans themselves create a new bean instance, it is assumed that all properties are appropriately defaulted in the new instance.


DiscrColumn

Internal.


IsNotNull

Determines if the attribute is mandatory.


IsPersistent

Determines if an attribute is persistent or transient


IsQueriable

Determines if this attribute can participate in a WHERE clause


IsUnique

Determines if the attribute is unique, and will have a UNIQUE constraint generated in the database.


IsUpdateable

Determines if the attribute is always updateable, only updateable while new, or never updateable.


IsVisible

.Determines if the attribute is visible or hidden.


Name

The attributes name.


PrecisionRule

Determines whether precision should be applied. If true, the precision rule is applied.


PrimaryKey

.Determines the attributes that participate in a primary key.

<AttributeAccessor>

ArrayElementType

This is only used for ADF Business Components domains, to define the array type.


BeanClass

Fully qualified package name. Identifies the full path to the type's structure definition.


CollectionBeanClass

Fully qualified package name. Identifies the full path to the method accessor's structure definition. In the case of a session bean that accesses an entity that is a collection, this value will be either ReadOnlyCollection or UpdateableCollection.


id

Unique identifier. Same as the method name that appears in the bean class.


IsCollection

Identifies whether the method accessor returns a collection. Set to true when the entity accessed is a collection and specify the CollectionBeanClass attribute value.


SourceName

The name of the property on the source of this bean.


BeanClass

Fully qualified package name. Identifies the full path to the type's structure definition.


CollectionBeanClass

Fully qualified package name. Identifies the full path to the method accessor's structure definition. In the case of a session bean that accesses an entity that is a collection, this value will be either ReadOnlyCollection or UpdateableCollection.


id

Unique identifier. Same as the method name that appears in the bean class.


IsCollection

Identifies whether the method accessor returns a collection. Set to true when the entity accessed is a collection and specify the CollectionBeanClass attribute value.


ReturnNodeName

Unique identifier. Name used in the Data Control Palette to display the return node.

<MethodAccessor> <ParameterInfo /></MethodAccessor>

id

Unique identifier. Same as the method parameter name that appears in the method signature of the session bean class


Type

Specifies the data type of the parameter


Sample Structure Definition for the <sessionbeanname>.xml File

Example: Structure Definition of SRAdminFacade.xml shows the sample SRAdminFacade.xml file from the SRDemo application. Notice that the SRAdminFacade.xml file lists attributes, accessors, and operations. Notice that operations may have parameters which reference other structure definitions (which are in turn composed of attributes, accessors, and operations).

Structure Definition of SRAdminFacade.xml

<?xml version="1.0" encoding="UTF-8" ?>
<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="10.1.3.35.83"
          id="SRAdminFacade" BeanClass="oracle.srdemo.model.SRAdminFacade"
          Package="oracle.srdemo.model" isJavaBased="true">
  <MethodAccessor IsCollection="false"
                  Type="oracle.srdemo.model.entities.ExpertiseArea"
                  BeanClass="oracle.srdemo.model.entities.ExpertiseArea"
                  id="createExpertiseArea"
                  ReturnNodeName="oracle.srdemo.model.entities.ExpertiseArea">
    <ParameterInfo id="product" Type="oracle.srdemo.model.entities.Product"
                   isStructured="true"/>
    <ParameterInfo id="user" Type="oracle.srdemo.model.entities.User"
                   isStructured="true"/>
    <ParameterInfo id="prodId" Type="java.lang.Integer" isStructured="false"/>
    <ParameterInfo id="userId" Type="java.lang.Integer" isStructured="false"/>
    <ParameterInfo id="expertiseLevel" Type="java.lang.String"
                   isStructured="false"/>
    <ParameterInfo id="notes" Type="java.lang.String" isStructured="false"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false"
                  Type="oracle.srdemo.model.entities.Product"
                  BeanClass="oracle.srdemo.model.entities.Product"
                  id="createProduct"
                  ReturnNodeName="oracle.srdemo.model.entities.Product">
    <ParameterInfo id="prodId" Type="java.lang.Integer" isStructured="false"/>
    <ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="image" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="description" Type="java.lang.String"
                   isStructured="false"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="oracle.srdemo.model.entities.User"
                  BeanClass="oracle.srdemo.model.entities.User" id="createUser"
                  ReturnNodeName="oracle.srdemo.model.entities.User">
    <ParameterInfo id="userId" Type="java.lang.Integer" isStructured="false"/>
    <ParameterInfo id="userRole" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="email" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="firstName" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="lastName" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="streetAddress" Type="java.lang.String"
                   isStructured="false"/>
    <ParameterInfo id="city" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="stateProvince" Type="java.lang.String"
                   isStructured="false"/>
    <ParameterInfo id="postalCode" Type="java.lang.String"
                   isStructured="false"/>
    <ParameterInfo id="countryId" Type="java.lang.String" isStructured="false"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="true" Type="oracle.srdemo.model.entities.User"
                  BeanClass="oracle.srdemo.model.entities.User"
                  id="findAllStaffWithOpenAssignments"
                  ReturnNodeName="oracle.srdemo.model.entities.User"
                  CollectionBeanClass="UpdateableCollection"/>
  <MethodAccessor IsCollection="true"
                  Type="oracle.srdemo.model.entities.ExpertiseArea"
                  BeanClass="oracle.srdemo.model.entities.ExpertiseArea"
                  id="findExpertiseByUserId"
                  ReturnNodeName="oracle.srdemo.model.entities.ExpertiseArea"
                  CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="userIdParam" Type="java.lang.Integer"
                   isStructured="false"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="java.lang.Object" id="mergeEntity"
                  ReturnNodeName="Return">
    <ParameterInfo id="entity" Type="java.lang.Object" isStructured="false"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="java.lang.Object"
                  id="persistEntity" ReturnNodeName="Return">
    <ParameterInfo id="entity" Type="java.lang.Object" isStructured="false"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="java.lang.Object"
                  id="refreshEntity" ReturnNodeName="Return">
    <ParameterInfo id="entity" Type="java.lang.Object" isStructured="false"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="void" id="removeEntity"
                  ReturnNodeName="Return">
    <ParameterInfo id="entity" Type="java.lang.Object" isStructured="false"/>
  </MethodAccessor>
</JavaBean>

Sample Structure Definition for the <entitybeanname>.xml File

The XML files that get created for a TopLink POJO, EJB entity or a Java bean are very similar, as the constructs listed in each case are generic ADF metadata. The following syntax shows a TopLink entity XML file.

Example: Structure Definition of Product.xml shows the sample Product.xml file from the SRDemo application. Notice the structure of the file, that it is broken up into attributes, accessors, and operations (methods).

Structure Definition of Product.xml

<?xml version="1.0" encoding="UTF-8" ?>
<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="10.1.3.35.65"
          id="Product" BeanClass="oracle.srdemo.model.entities.Product"
          Package="oracle.srdemo.model.entities" isJavaBased="true">
  <Attribute Name="description" Type="java.lang.String"/>
  <Attribute Name="image" Type="java.lang.String"/>
  <Attribute Name="name" Type="java.lang.String"/>
  <Attribute Name="prodId" Type="java.lang.Integer"/>
  <AccessorAttribute id="expertiseAreaCollection" IsCollection="true"
                     BeanClass="oracle.srdemo.model.entities.ExpertiseArea"
                     CollectionBeanClass="UpdateableCollection"/>
  <AccessorAttribute id="serviceRequestCollection" IsCollection="true"
                     BeanClass="oracle.srdemo.model.entities.ServiceRequest"
                     CollectionBeanClass="UpdateableCollection"/>
  <MethodAccessor IsCollection="false" Type="void" id="addExpertiseArea"
                  ReturnNodeName="Return">
    <ParameterInfo id="anExpertiseArea"
                   Type="oracle.srdemo.model.entities.ExpertiseArea"
                   isStructured="true"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="void" id="addExpertiseArea"
                  ReturnNodeName="Return">
    <ParameterInfo id="index" Type="int" isStructured="false"/>
    <ParameterInfo id="anExpertiseArea"
                   Type="oracle.srdemo.model.entities.ExpertiseArea"
                   isStructured="true"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="void" id="addServiceRequest"
                  ReturnNodeName="Return">
    <ParameterInfo id="aServiceRequest"
                   Type="oracle.srdemo.model.entities.ServiceRequest"
                   isStructured="true"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="void" id="addServiceRequest"
                  ReturnNodeName="Return">
    <ParameterInfo id="index" Type="int" isStructured="false"/>
    <ParameterInfo id="aServiceRequest"
                   Type="oracle.srdemo.model.entities.ServiceRequest"
                   isStructured="true"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="void" id="removeExpertiseArea"
                  ReturnNodeName="Return">
    <ParameterInfo id="anExpertiseArea"
                   Type="oracle.srdemo.model.entities.ExpertiseArea"
                   isStructured="true"/>
  </MethodAccessor>
  <MethodAccessor IsCollection="false" Type="void" id="removeServiceRequest"
                  ReturnNodeName="Return">
    <ParameterInfo id="aServiceRequest"
                   Type="oracle.srdemo.model.entities.ServiceRequest"
                   isStructured="true"/>
  </MethodAccessor>
  <ConstructorMethod IsCollection="false" Type="void" id="Product"/>
</JavaBean>

Collection and SingleValue Sample Files

Four additional files are also generated:

These files support the Data Control Palette in JDeveloper. The files are used only at design time to specify the list of operations that the Data Control Palette may display for a given accessor. These files are referenced by the accessor's CollectionBeanClass attribute. Typically you do not edit these files, but if you wanted to remove an operation from the Palette, you could remove an item on this list.

Example: Data Control Registry Syntax shows a read-only collection. The syntax for all four design-time XML files is similar.

Read-only Collection Syntax

<?xml version="1.0" encoding="UTF-8" ?>
<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="10.1.3.35.65"
          id="ReadOnlyCollection" BeanClass="ReadOnlyCollection"
          isJavaBased="false">
  <BuiltinOperation id="IteratorExecute"/>
  <BuiltinOperation id="Find"/>
  <BuiltinOperation id="First"/>
  <BuiltinOperation id="Last"/>
  <BuiltinOperation id="Next"/>
  <BuiltinOperation id="Previous"/>
  <BuiltinOperation id="NextSet"/>
  <BuiltinOperation id="PreviousSet"/>
  <BuiltinOperation id="setCurrentRowWithKey"/>
  <BuiltinOperation id="setCurrentRowWithKeyValue"/>
</JavaBean>

DataBindings.cpx

The DataBindings.cpx file is created in the user interface project the first time you drop a data control usage onto a web page in the HTML Visual Editor. The .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. 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.

If you are familiar with building ADF applications in earlier releases of JDeveloper, you'll notice that the .cpx file no longer contains all the information copied from the DataControls.dcx file, but only a reference to it. Therefore, if you need to make changes to the .cpx file, you must edit the DataControls.dcx file.

The DataBindings.cpx file appears in the /src directory of the user interface project folder. When you double-click the file node, the binding context description appears in the XML Source Editor. (To edit the binding context parameters, use the Property Inspector and select the desired parameter in the Structure window.)

DataBindings.cpx Syntax

The toplevel element of the DataBindings.cpx file is <DataControlConfigs>:

<DataControlConfigs xmlns="http://xmlns.oracle.com/adfm/configuration"
                    version="10.1.3.35.65" Package="oracle.srdemo.model"
                    id="DataControls">

where the XML namespace attribute (xmlns) specifies the URI to which the data controls bind at runtime. Only the package name is editable; all other attributes should have the values shown.

Figure: Schema for the Structure Definition of the DataBindings.cpx File displays the child element hierarchy of the <DataControlConfigs> element. Note that each business service for which you have created a data control, will have its own <dataControlUsages> definition.

Schema for the Structure Definition of the DataBindings.cpx File

Schema for Structure Definition of DataBindings.cpx File

The child elements have the following usages:

Table: Attributes of the DataBindings.cpx File Elements describes the attributes of the DataBindings.cpx elements.

Attributes of the DataBindings.cpx File Elements

Element Syntax Attributes Attribute Description

<pageMap> <page /></pageMap>

path

The full directory path. Identifies the location of the user interface page.


usageId

A unique qualifier. Names the page definition id that appears in the ADF page definition file. The ADF binding servlet looks at the incoming URL requests and checks that the bindings variable is pointing to the ADF page definition associated with the URL of the incoming HTTP request.

<pageDefinitionUsages> <page/></pageDefinitionUsages>

id

A unique qualifier. References the page definition id that appears in the ADF page definition file.


path

The fully qualified package name. Identifies the location of the user interface page's ADF page definition file.

<dataControlUsages> <dc ... /></dataControlUsages>

id

A unique qualifier. Identifies the data control usage as is defined in the DataControls.dcx file.


path

The fully qualified package name. Identifies the location of the data control


DataBindings.cpx Sample

Example: DataBindings.cpx Sample shows the syntax for the DataBindings.cpx file in the SR Demo application. It uses two session facades data controls and a URL data control. In the following code, notice the references to the data controls within the DCX. For example, <dc id="SRDemoFAQ" path="oracle.srdemo.faq.SRDemoFAQ"/> finds "SRDemoFAQ" via the data control id within DataControls.dcx.

DataBindings.cpx Sample

<?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"/>
  </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"/>          
  </pageDefinitionUsages>
  <dataControlUsages>
    <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>

<pageName>PageDef.xml

The <pageName>PageDef.xml files are created each time you insert a databound component into a web page using the Data Control Palette or Structure window. These XML files define the Oracle ADF binding container for each web page in the application. The binding container provides access to the bindings within the page. Therefore, you will have one XML file for each databound web page.


Note:

You cannot rename the <pageName>PageDef.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 <pageName>PageDef.xml file, you must also update the DataBindings.cpx file references for the id and path attributes in the <pageDefinitionUsages> element.

The PageDef.xml file appears in the /src/view directory of the ViewController 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 page description appears in the XML Source Editor. To edit the page description parameters, use the Property Inspector and select the desired parameter in the Structure window.

There are important differences in how the PageDefs are generated for methods that return a single-value and a collection, so these are listed separately below.

PageDef.xml Syntax

The toplevel element of the PageDef.xml file is <pageDefinition>:

<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                version="10.1.3.35.83" id="<pagename>PageDef"
                Package="oracle.srdemo.view.pageDefs">

where the XML namespace attribute (xmlns) specifies the URI to which the ADF binding container binds at runtime. Only the package name is editable; all other attributes should have the values shown.

Example: PageDef.xml Element Hierarchy displays the child element hierarchy of the <pageDefinition> element. Note that each business service for which you have created a data control, will have its own <AdapterDataControl> definition.

PageDef.xml Element Hierarchy

<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition>
    <parameters>
        ...
    </parameters>
    <executables>
        ...
    </executables>
    <bindings>
        ...
    </bindings>
</pageDefinition>

The child elements have the following usages:

Table: Attributes of the PageDef.xml File <pageDefinition> Element describes the attributes of the toplevel <pageDefinition> element.

Attributes of the PageDef.xml File <pageDefinition> Element

Element Syntax Attributes Attribute Description

<pageDefinition>

ControllerClass

Fully qualified classname to create when controller requests a PageController object for this bindingContainer


EnableTokenValidation

Enables currency validation for this bindingContainer when a postback occurs. This is to confirm that the web tier state matches the state that particular page was rendered with.


FindMode

This is for legacy (10.1.2) use only and indicates if this bindingContainer should start out in findMode when initially prepared.


MsgBundleClass

Fully qualified package name. Identifies the class which contains translation strings for any bindings


Viewable

An EL expression that should resolve at runtime to whether this binding and the associated component should be rendered or not.


Table: Attributes of the PageDef.xml File <parameters> Element describes the attributes of the child element of <parameters>.

Attributes of the PageDef.xml File <parameters> Element

Element Syntax Attributes Attribute Description

<parameter>

id

Unique identifier. May be referenced by ADF bindings


option

Indicates the usage of the variable within the binding container:

  • Final indicates that this parameter cannot be passed in by a usage of this binding container, it must use the default value in the definition.

  • Optional indicates the variable value need not be provided.

  • Mandatory indicates the variable value must be provided or a binding container exception will be thrown.


readonly

Indicates whether the parameter value may be modified or not. Set to true when you do not want the application to modify the parameter value.


value

A default value, this can be an EL expression.


Table: Attributes of the PageDef.xml File <executables> Element describes the attributes of the PageDef.xml <executables> elements.

Attributes of the PageDef.xml File <executables> Element

Element Syntax Attributes Attribute Description

<accessorIterator>

BeanClass

Identifies the Java type of beans in the associated iterator/collection.


CacheResults

If true, manage the data collection between requests.


DataControl

The data control which interprets/returns the collection referred to by this iterator binding.


id

Unique identifier. May be referenced by any ADF value binding.


MasterBinding

Reference to the methodIterator (or iterator) that binds the data collection that serves as the master to the accessor iterator's detail collection.


ObjectType

This is used for ADF Business Components only. A boolean value determines if the collection is an object type or not.


RangeSize

Specifies the number of data objects in a range to fetch from the bound collection. The range defines a window you can use to access a subset of the data objects in the collection. By default, the range size is set to a range that fetches just ten data objects. Use RangeSize when you want to work with an entire set or when you want to limit the number of data objects to display in the page. Note that the values -1 and 0 have specific meaning: the value -1 returns all available objects from the collection, while the value 0 will return the same number of objects as the collection uses to retrieve from its data source.


Refresh

Determines when and whether the executable should be invoked. Set one of the following properties as required:

  • always - causes the executable to be invoked each time the binding container is prepared. This will occur when the page is displayed and when the user submits changes, or when the application posts back to the page.

  • deferred - refresh occurs when another binding requires/refers to this executable.Since refreshing an executable may be a performance concern, you can set the refresh to only occur if it's used in a binding that is being rendered.

  • ifNeeded - (default) whenever the framework needs to refresh the executable because it has not been refreshed to this point. For example, when you have an accessor hierarchy such that a detail is listed first in the page definition, the master could be refreshed twice (once for the detail and again for the master's iterator). Using ifNeeded gives the mean to avoid duplicate refreshes. This is the default behavior for executables.

  • never - When the application itself will call refresh on the executable during one of the controller phases and does not want the framework to refresh it at all.

  • prepareModel - causes the executable to be invoked each time the page's binding container is prepared.

  • prepareModelIfNeeded - causes the executable to be invoked during the prepareModel phase if this executable has not been refreshed to this point. See also ifNeeded above.

  • renderModel - causes the executable to be invoked each time the page is rendered.

  • renderModelIfNeeded - causes the executable to be invoked during the page's renderModel phase on the condition that it is needed. See also ifNeeded above.


RefreshCondition

An EL expression that when resolved, determines when and whether the executable should be invoked. For example, ${!bindings.findAllServiceRequestIter.findMode} resolves the value of the findMode on the iterator in the ADF binding context AllServiceRequest. Hint: Use the Property Inspector to create expressions from the available objects of the binding context (bindings namespace) or binding context (data namespace), JSF managed beans, and JSP objects.

<invokeAction>

Binds

Determines the action to invoke. This may be on any actionBinding. Additionally, in the case, of the EJB session facade data control, you may bind to the finder method exposed by the data control. Built-in actions supported by the EJB session facade data control include:

  • Execute executes the bound action defined by the data collection.

  • Find retrieves a data object from a collection.

  • First navigates to the first data object in the data collection range.

  • Last navigates to the first data object in the data collection range.

  • Next navigates to the first data object in the data collection range. If the current range position is already on the last data object, then no action is performed.

  • Previous navigates to the first data object in the data collection range. If the current position is already on the first data object, then no action is performed.

  • setCurrentRowWithKey passes the row key as a String converted from the value specified by the input field. The row key is used to set the currency of the data object in the bound data collection. When passing the key, the URL for the form will not display the row key value. You may use this operation when the data collection defines a multipart attribute key.

  • setCurrentRowWithKeyValue is used as above, but when you want to use a primary key value instead of the stringified key.


id

Unique identifier. May be referenced by any ADF action binding


Refresh

see Refresh above.


RefreshCondition

see RefreshCondition above.

<iterator> and <methodIterator>

BeanClass

Identifies the Java type of beans in the associated iterator/collection


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


Binds

see Binds above.


CacheResults

see CacheResults above


DataControl

Name of the DataControl usage in the bindingContext (.cpx) which this iterator is associated with.


DefClass

Used internally for testing.


id

Unique identifier. May be referenced by any ADF value binding.


ObjectType

Not used by EJB session facade data control (used by ADF Business Components only).


RangeSize

see RangeSize above


Refresh

see Refresh above


RefreshCondition

see RefreshCondition above

<page> and <variableIterator>

id

Unique identifier. In the case of <page>, refers to nested page/region that is included in this page. In the case of the <variableIterator> executable, the identifier may be referenced by any ADF value binding


path

Used by <page> executable only. Advanced, a fully qualified path that may reference another page's binding container.


Refresh

see Refresh above


RefreshCondition

see RefreshCondition above


Table: Attributes of the PageDef.xml File <bindings> Elements describes the attributes of the PageDef.xml <bindings> element.

Attributes of the PageDef.xml File <bindings> Elements

Element Syntax Attributes Attribute Description

<action>

Action

Fully qualified package name. Identifies the class for which the data control is created. In the case of the EJB session facade, this the session bean


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


DataControl

Name of the DataControl usage in the bindingContext (.cpx) which this iteratorBinding or actionBinding is associated with.

<attributeValues>

ApplyValidation

Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF Business Components, when running in local mode and the same validators are already defined on the corresponding attribute.


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


ControlClass

Used internally for testing purposes.


CustomInputHandler

This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding.


DefClass

Used internally for testing.


id

Unique identifier. May be referenced by any ADF action binding


IterBinding

Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated.


NullValueId

Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display.

<button>

ApplyValidation

Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF Business Components, when running in local mode and the same validators are already defined on the corresponding attribute.


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


BoolVal

Identifies whether the value at the zero index in the static value list in this boolean list binding represents true or false.


ControlClass

Used internally for testing purposes.


CustomInputHandler

This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding.


DefClass

Used internally for testing.


id

Unique identifier. May be referenced by any ADF action binding


IterBinding

Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated.


ListIter

Refers to the iteratorBinding that is associated with the source list of this listBinding.


ListOperMode

Determines if this list binding is for navigation, contains a static list of values or is a LOV type list.


NullValueFlag

Describes whether this list binding has a null value and if so, whether it should be displayed at the beginning of the list or the end.


NullValueId

Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display.

<graph>

ApplyValidation

Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF Business Components, when running in local mode and the same validators are already defined on the corresponding attribute.


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


BoolVal

Identifies whether the value at the zero index in the static value list in this boolean list binding represents true or false.


ChildAccessorName

The name of the accessor to invoke to get the next level of nodes for a given Hierarchical Node Type in a tree.


ControlClass

Used internally for testing purposes.


CustomInputHandler

This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding.


DefClass

Used internally for testing.


id

Unique identifier. May be referenced by any ADF action binding


IterBinding

Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated.


NullValueId

Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display.

<list>

ApplyValidation

Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF Business Components, when running in local mode and the same validators are already defined on the corresponding attribute.


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


ControlClass

Used internally for testing purposes.


CustomInputHandler

This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding.


DefClass

Used internally for testing.


id

Unique identifier. May be referenced by any ADF action binding


IterBinding

Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated.


ListIter

Refers to the iteratorBinding that is associated with the source list of this listBinding.


ListOperMode

Determines if this list binding is for navigation, contains a static list of values or is a LOV type list.


NullValueFlag

Describes whether this list binding has a null value and if so, whether it should be displayed at the beginning of the list or the end.


NullValueId

Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display.


StaticList

Defines a static list of values that will be rendered in the bound list component.

<methodAction>

Action

Fully qualified package name. Identifies the class for which the data control is created. In the case of the EJB session facade, this the session bean


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


ClassName

This is the class to which the method being invoked belongs.


CustomInputHandler

This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding.


DataControl

Name of the DataControl usage in the bindingContext (.cpx) which this iteratorBinding or actionBinding is associated with.


DefClass

Used internally for testing.


id

Unique identifier. May be referenced by any ADF action binding


InstanceName

A dot-separated EL path to a Java object instance on which the associated method is to be invoked.


IsLocalObjectReference

Set to True if the instanceName contains an EL path relative to this bindingContainer.


IterBinding

Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated.


MethodName

Indicates the name of the operation on the given instance/class that needs to be invoked for this methodActionBinding.


RequiresUpdateModel

Whether this action requires that the model be updated before the action is to be invoked.


ReturnName

The EL path of the result returned by the associated method.

<table> and <tree>

ApplyValidation

Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF Business Components, when running in local mode and the same validators are already defined on the corresponding attribute.


BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3.


ControlClass

Used internally for testing purposes.


CustomInputHandler

This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding.


DefClass

Used internally for testing.


DiscrValue

Indicates the discriminator value for a hierarchical type binding (type definition for a tree node). This value is used to determine if a given row in a collection being rendered in a polymorphic tree binding should be rendered using the containing hierarchical type binding.


id

Unique identifier. May be referenced by any ADF action binding


IterBinding

Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated.


NullValueId

Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display.


PageDef.xml Sample for a Method That Returns a String

This is the page definition file that's created when you drop the method return User from the method findUserByEmail() from the Data Control Palette, SRPublicFacade node, into your open JSP page.

PageDef for findUserByEmail()

<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                version="10.1.3.36.7" id="untitled1PageDef"
                Package="project1.pageDefs">
  <parameters/>
  <executables>
    <variableIterator id="variables"/>
    <methodIterator id="findUserByEmailIter" Binds="findUserByEmail.result"
                    DataControl="SRPublicFacade" RangeSize="10"
                    BeanClass="oracle.srdemo.model.entities.User"/>
  </executables>
  <bindings>
    <methodAction id="findUserByEmail"
                  InstanceName="SRPublicFacade.dataProvider"
                  DataControl="SRPublicFacade" MethodName="findUserByEmail"
                  RequiresUpdateModel="true" Action="999"
                  ReturnName="SRPublicFacade.methodResults.SRPublicFacade_dataProvider_findUserByEmail_result">
      <NamedData NDName="emailParam" NDValue="mkorf@oracle.com"
                 NDType="java.lang.String"/>
    </methodAction>
    <table id="findUserByEmail1" IterBinding="findUserByEmailIter">
      <AttrNames>
        <Item Value="city"/>
        <Item Value="countryId"/>
        <Item Value="email"/>
        <Item Value="firstName"/>
        <Item Value="lastName"/>
        <Item Value="postalCode"/>
        <Item Value="stateProvince"/>
        <Item Value="streetAddress"/>
        <Item Value="userId"/>
        <Item Value="userRole"/>
      </AttrNames>
    </table>
  </bindings>
</pageDefinition>

PageDef.xml Sample for a Method that Returns a Collection

This is the page definition file that's created when you drop the User node from the findAllStaff() method in the Data Control Palette, SRPublicFacade node, into your open JSP page. This one is a collection.

PageDef for Method that Returns a Collection

<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                version="10.1.3.36.7" id="untitled2PageDef"
                Package="project1.pageDefs">
  <parameters/>
  <executables>
    <methodIterator id="findAllStaffIter" Binds="findAllStaff.result"
                    DataControl="SRPublicFacade" RangeSize="10"
                    BeanClass="oracle.srdemo.model.entities.User"/>
  </executables>
  <bindings>
    <methodAction id="findAllStaff" InstanceName="SRPublicFacade.dataProvider"
                  DataControl="SRPublicFacade" MethodName="findAllStaff"
                  RequiresUpdateModel="true" Action="999"
                  ReturnName="SRPublicFacade.methodResults.SRPublicFacade_dataProvider_findAllStaff_result"/>
    <table id="findAllStaff1" IterBinding="findAllStaffIter">
      <AttrNames>
        <Item Value="city"/>
        <Item Value="countryId"/>
        <Item Value="email"/>
        <Item Value="firstName"/>
        <Item Value="lastName"/>
        <Item Value="postalCode"/>
        <Item Value="stateProvince"/>
        <Item Value="streetAddress"/>
        <Item Value="userId"/>
        <Item Value="userRole"/>
      </AttrNames>
    </table>
  </bindings>
</pageDefinition>

web.xml

This section describes Oracle ADF configuration settings specific to the standard web.xml deployment descriptor file.

In JDeveloper when you create a project that uses JSF technology, a starter web.xml file with default settings is created for you in /WEB-INF. To edit the file, double-click web.xml in the Application Navigator to open it in the XML editor.

The following must be configured in web.xml for all applications that use JSF and ADF Faces:

The JSF servlet and mapping configuration settings are automatically added to the starter web.xml file when you first create a JSF project. When you insert an ADF Faces component into a JSF page for the first time, JDeveloper automatically inserts the configuration settings for ADF Faces filter and mapping, and resource servlet and mapping.

Configuring web.xml for ADF Faces and JSF

<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
  <description>Empty web.xml file for Web Application</description>

  <!-- Installs the ADF Faces Filter -- >
  <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
  </filter>

  <!-- Adds the mapping to ADF Faces Filter -- >
  <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
  </filter-mapping>

  <!-- Maps the JSF servlet to a symbolic name -->
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <!-- Maps ADF Faces ResourceServlet to a symbolic name -- >
  <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
  </servlet>

  <!-- Maps URL pattern to the JSF servlet's symbolic name -->
  <!-- You can use either a path prefix or extension suffix pattern -->
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>

  <!-- Maps URL pattern to the ResourceServlet's symbolic name -->
  <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
  </servlet-mapping>
...
</web-app>

Configuring for State Saving through What You May Need to Know detail the context parameters you could use in web.xml when you work with JSF and ADF Faces.

Tasks Supported by the web.xml File

The following JSF and ADF Faces tasks are supported by the web.xml file.