A Oracle 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:

A.1 Introduction to the ADF Metadata Files

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

  • Specify the parameters, methods, and return values available to your application's Oracle ADF data control usages

  • Create objects in the Oracle ADF binding context and define the runtime behavior of those objects

  • Define configuration information about the UI components in JSF and Oracle ADF Faces

  • Define application configuration information for the Java EE application server

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 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.

A.2 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 A-1 illustrates the hierarchical relationship of the XML metadata files that you might work with in a Fusion web application that uses an ADF Business Components application module as a service interface to JSF web pages.

Figure A-1 Oracle ADF File Hierarchy Overview for the Fusion Web Application

Oracle ADF file hierarchy

A.2.1 Oracle ADF Data Control Files

In an ADF Business Components application, the data control implementation files are contained within the application. The application module and view object XML component descriptor files provide the references for the data control. These files, in conjunction with the bc4j.xcfg file, provide the necessary information for the data control.

An application that uses ADF Business Components in one project and a non-ADF Business Components data control in another project may have a DataControls.dcx file, as well as supporting <sessionbeanname>.xml and <beanname>.xml files.

A.2.2 Oracle ADF Data Binding Files

These standard XML configuration files for a Fusion web application appear in your user interface project:

  • adfm.xml: This file lists the DataBindings.cpx file that is available in the current project.

    See Section A.4, "adfm.xml" for more information.

  • DataBindings.cpx : This file contains the page map, page definitions references, and data control references. The file is created the first time you create a data binding for a UI component (either from the Structure window or from the Data Controls Panel). The DataBindings.cpx file defines the Oracle ADF binding context for the entire application. The binding context provides access to the bindings and data controls across the entire application. The DataBindings.cpx file also contains references to the <pagename>PageDef.xml files that define the metadata for the Oracle ADF bindings in each web page.

    For more information, see Section A.7, "DataBindings.cpx".

  • <pagename>PageDef.xml: This is the page definition XML file. It associates web page UI components with data, or data controls. JDeveloper creates this file each time you design a new web page using the Data Controls Panel or Structure window. These XML files contain the metadata used to create the bindings that populate the data in the web page's UI components. For every web page that refers to an ADF binding, there must be a corresponding page definition file with binding definitions.

    For more information, see Section A.8, "pageNamePageDef.xml".

A.2.3 Web Configuration Files

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

  • web.xml: Part of the application's configuration is determined by the contents of its Java EE application deployment descriptor, web.xml. The web.xml file defines everything about your application that a server needs to know. The file plays a role in configuring the Oracle ADF data binding by setting up the ADFBindingFilter. Additional runtime settings include servlet runtime and initialization parameters, custom tag library location, and security settings.

    For more information about ADF data binding and JSF configuration options, see Section A.13, "web.xml".

    An ADF Faces application typically uses its own set of configuration files in addition to web.xml. For more information, see the "Configuration in trinidad-config.xml" section in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

  • adfc-config.xml: The configuration file for an ADF unbounded task flow. The configuration file contains metadata about the activities and control flows contained in the unbounded task flow. The default name for this file is adfc-config.xml, but an end user can change the name.

    For more information, see Section A.9, "adfc-config.xml".

  • task-flow-definition.xml: The configuration file for an ADF bounded task flow. The configuration file contains metadata about the activities and control flows contained in the bounded task flow. The default name for this file can be task-flow-defintion.xml or whatever an end user specifies in the Create ADF Task Flow dialog. The same application can contain multiple task flow definition files.

    For more information, see Section A.10, "task-flow-definition.xml".

A.3 ADF File Syntax Diagram

Figure A-2 illustrates the hierarchical relationship of the XML metadata files that you might work with in a web application that uses an ADF application module as a service interface to ADF Business Components. 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 an empty binding context.

  3. When a page is rendered, the binding filter asks the binding context to load a corresponding PageDef.xml for the page.

  4. The binding context creates the binding container by loading the <page> file as referenced by the <pagemap> element in the DataBindings.cpx file.

  5. The adfm.xml file loads the DataBindings.cpx contents and finds the right PageDef.xml based on the <pagemap> element reference to the <pageDefinitionUsage> element.

  6. The binding container's prepareModel phase prepares and refreshes all relevant executables (most are marked deferred by default).

  7. An iterator binding gets executed by referencing the named method on the data control found through the data control factory named in the case of ADF Business Components in the bc4j.xcfg file.

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

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

  10. The page pulls the available data from the bindings in the binding container.

Figure A-2 Oracle ADF File Hierarchy and Syntax Diagram for an ADF BC-based Web Application

ADF file hierarchy and syntax diagram

A.4 adfm.xml

The adfm.xml file contains the classpath-relative paths for the .cpx, .dcx, .jpx, and .xcfg files in each design time project that is included in the runtime deployed application. The adfm.xml file operates as a dynamically maintained "Registry of Registries" that is used to quickly find all .cpx, .dcx, .jpx, and .xcfg files (which are themselves registries of metadata).

The file registry is used extensively by the ADF Library resource catalog browsing implementations, by the ADF model layer design time, and at runtime during merge and discovery.

When a developer creates a binding on a page, JDeveloper adds metadata files (for example, page definitions) in the project source tree. The adfm.xml file then notes the location of each.

When a project is built, the adfm.xml file is put in project-root/adfmsrc/META-INF/adfm.xml. The project-level archive deployment profiles locate the file at META-INF/adfm.xml.

At runtime, the application classpath is scanned to build the list of .cpx files that comprise the application. The application then loads each.cpx as needed to create the binding context. For details about the ADF model layer usage, see Section 13.4.2, "What Happens When You Use the Data Controls Panel".

Four types of sub registries are recorded by the adfm.xml file:

  • DataBindingRegistry (.cpx)

  • DataControlRegistry (.dcx)

  • BusinessComponentServiceRegistry (.xcfg)

  • BusinessComponentProjectRegistry (.jpx)

A.5 modelProjectName.jpx

The.jpx file contains configuration information that JDeveloper uses in the design time to allow you to create the data model project with ADF Business Components. It also contains metadata that defines how a shared application module is used at runtime. Because the shared application module can be accessed by any data model project in the same Fusion web application, JDeveloper maintains the scope of the shared application module in the ADF Business Components project configuration file.

This file is saved in the src directory of the project. For example, if you look at the StoreFrontService.jpx file in the ./src/model subdirectory of the Fusion Order Demo application's StoreFrontService project, you will see the SharedLookupService application module's usage definition. For details about the shared application module usage, see Section 10.2.2, "What Happens When You Define a Shared Application Module".

Example A-2 displays a sample default.jpx file.

Example A-1 Sample .jpx File

<JboProject
   xmlns="http://xmlns.oracle.com/bc4j"
   Name="StoreFrontService"
   Version="11.1.1.49.73"
   SeparateXMLFiles="true"
   PackageName="">
   <DesignTime>
      <Attr Name="_appModuleNames0"
         Value="oracle.fodemo.storefront.lookups.LookupServiceAM"/>
      <Attr Name="_domainNames0"
         Value="oracle.fodemo.storefront.entities.formatters.UppercaseOracleStyleDate"/>
      <Attr Name="_jprName" Value="../StoreFrontService.jpr"/>
      <Attr Name="_appModuleNames1"
         Value="oracle.fodemo.storefront.store.service.StoreServiceAM"/>
      <Attr Name="_NamedConnection" Value="FOD"/>
   </DesignTime>
   <Containee
      Name="links"
      FullName="oracle.fodemo.storefront.account.queries.links.links"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VO" Value="true"/>
         <Attr Name="_VL" Value="true"/>
   </DesignTime>
   </Containee>
   <Containee
      Name="queries"
      FullName="oracle.fodemo.storefront.account.queries.queries"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VO" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="associations"
      FullName="oracle.fodemo.storefront.entities.associations.associations"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_AS" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="entities"
      FullName="oracle.fodemo.storefront.entities.entities"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_EO" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="formatters"
      FullName="oracle.fodemo.storefront.entities.formatters.formatters"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_DO" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="lookups"
      FullName="oracle.fodemo.storefront.lookups.lookups"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VO" Value="true"/>
         <Attr Name="_AM" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="links"
      FullName="oracle.fodemo.storefront.store.queries.links.links"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VL" Value="true"/>
      </DesignTime>
   </Containee>   <Containee
      Name="queries"
      FullName="oracle.fodemo.storefront.store.queries.queries"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VO" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="service"
      FullName="oracle.fodemo.storefront.store.service.service"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_AM" Value="true"/>
      </DesignTime>
   </Containee>
   <AppModuleUsage
      Name="SharedLookupService"
      FullName="oracle.fodemo.storefront.lookups.LookupServiceAM"
      ConfigurationName="oracle.fodemo.storefront.lookups.null"
      SharedScope="1"/>
</JboProject>

A.6 bc4j.xcfg

The bc4j.xcfg file contains metadata information about application module names, the database connection used by the application module, and the runtime parameters the user has configured for the application module.

The bc4j.xcfg file is located in the ./common subdirectory relative to the application module's XML component definition. All of the configurations for all of the application modules in a single Java package are saved in that same file. For example, if you look at the bc4j.xcfg file in the ./classes/oracle/fodemo/storefront/store/service/common directory of the Fusion Order Demo application's StoreFront project, you will see the three named configurations for its StoreServiceAM application module. For details about editing the configurations, see Section 9.3.4, "How to Change Your Application Module's Runtime Configuration" and Section 44.2, "Setting Pool Configuration Parameters".

Example A-2 displays a sample bc4j.xcfg file from the Fusion Order Demo application.

Example A-2 Sample bc4j.xcfg File

<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">
   <AppModuleConfigBag ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM">
      <AppModuleConfig 
             DeployPlatform="LOCAL" 
             JDBCName="FOD" 
             jbo.project="StoreFrontService"
             name="StoreServiceAMLocal"
             ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM">
         <Database jbo.locking.mode="optimistic"/>
         <Security AppModuleJndiName="oracle.fodemo.storefront.store.service.StoreServiceAM"/>
      </AppModuleConfig>
      <AppModuleConfig 
               DeployPlatform="LOCAL" 
               JDBCName="FOD"
               jbo.project="StoreFrontService" 
               name="StoreServiceAMLocalWeb" 
               ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM">
         <AM-Pooling jbo.ampool.initpoolsize="1"/>
         <Database jbo.locking.mode="optimistic"/>
         <Security AppModuleJndiName="oracle.fodemo.storefront.store.service.StoreServiceAM"/>
         <Custom fod.application.issoaenabled="true"/>
      </AppModuleConfig>
      <AppModuleConfig 
               name="StoreFrontService"
               ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM"
               jbo.project="StoreFrontService" 
               DeployPlatform="SI">
         <AM-Pooling jbo.ampool.resetnontransactionalstate="true"/>
         <Database jbo.SQLBuilder="ORACLE" jbo.locking.mode="optimistic"
                   jbo.TypeMapEntries="Java"/>
         <Security AppModuleJndiName="oracle.fodemo.storefront.store.service.StoreServiceAM"/>
         <Custom JDBCDataSource="java:comp/env/jdbc/FODDS"/>
      </AppModuleConfig>
   </AppModuleConfigBag>
</BC4JConfig>

A.7 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 visual editor. 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. It is used extensively by the ADF Library Resource Palette browsing implementations, and also by the .cpx and .dcx design time and runtime merge and discovery. 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 Fusion web 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. 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. 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.)

A.7.1 DataBindings.cpx Syntax

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

<?xml version = '1.0' encoding = 'UTF-8'?>
<BC4JConfig version="11.0" xmlns="http://xmlns.oracle.com/bc4j/configuration">

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 A-3 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.

Figure A-3 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:

  • <definitionFactories> registers a factory class to create the ADF binding objects associated with a particular namespace at runtime. The factory class is specific to the namespace associated with the type of ADF binding (for instance, a task flow binding).

  • <pageMap> maps all user interface URLs and the corresponding page definition usage name. This map is used at runtime to map a URL to its page definition.

  • <pageDefinitionUsages> maps a page definition usage (BindingContainer instance) name to the corresponding page definition. The id attribute represents the usage ID. The path attribute represents the full path to the page definition.

  • <dataControlUsages> declares a list of data control usages (shortnames) and corresponding path to the data control definition entries in the .dcx or .xcfg file.

Table A-1 describes the attributes of the DataBindings.cpx elements.

Table A-1 Attributes of the DataBindings.cpx File Elements

Element Syntax Attributes Attribute Description

<definitionFactories> <factory/></definitionFactories>

nameSpace

A URI. Identifies the location of the executable elements in the page definition usage.

 

className

The fully qualified class name. Identifies the location of the factory class that creates the page definition usage objects.

<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.


A.7.2 DataBindings.cpx Sample

Example A-3 shows the syntax for the DataBindings.cpx file in the Fusion Order Demo application.

The ADF executable definition factory (factory element) is named by a className attribute and is associated with a namespace. At runtime, the factory class creates the executable definition objects that leads to the creation of the binding objects for the ADF binding container associated with a particular page definition. The factory locates the page definition through two DataBindings.cpx file elements: the pageMap element that maps the page URL to the page definition ID (usageId attribute) assigned at design time and the pageDefinitionUsages element that maps the ID to the location of the page definition from the project or project classpath.

Additionally, the ADF Business Components data control (BC4JDataControl element) is named by the id attribute. The combination of the Package attribute and the Configuration attribute is used to locate the bc4j.xcfg file in the ./common subdirectory of the indicated package. The configuration contains the information of the application module name and all the runtime parameters the user has configured.

Example A-3 Sample DataBindings.cpx File

<Application xmlns="http://xmlns.oracle.com/adfm/application"
             version="11.1.1.44.61" id="DataBindings" SeparateXMLFiles="false"
             Package="oracle.fodemo.storefront" ClientType="Generic"
             ErrorHandlerClass="oracle.fodemo.frmwkext.FODCustomErrorHandler">
  <definitionFactories>
    <factory nameSpace="http://xmlns.oracle.com/adf/controller/binding"
             className="oracle.adf.controller.internal.binding.
                                             TaskFlowBindingDefFactoryImpl"/>
    <factory nameSpace="http://xmlns.oracle.com/adfm/dvt"
             className="oracle.adfinternal.view.faces.dvt.model.binding.
                                             FacesBindingFactory"/>
  </definitionFactories>
  <pageMap>
    <page path="/home.jspx" usageId="homePageDef"/>
    ...
  </pageMap>
  <pageDefinitionUsages>
    <page id="homePageDef"
          path="oracle.fodemo.storefront.pageDefs.homePageDef"/>
    ...
  </pageDefinitionUsages>
  <dataControlUsages>
    <BC4JDataControl id="StoreServiceAMDataControl"
                     Package="oracle.fodemo.storefront.store.service"
                     FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
                     SupportsTransactions="true" SupportsFindMode="true"
                     SupportsRangesize="true" SupportsResetState="true"
                     SupportsSortCollection="true"
                     Configuration="StoreServiceAMLocalWeb" syncMode="Immediate"
                     xmlns="http://xmlns.oracle.com/adfm/datacontrol"/>
    ...
  </dataControlUsages>
</Application>

A.8 pageNamePageDef.xml

The pageNamePageDef.xml files are created each time you insert a databound component into a web page using the Data Controls 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. You will have one XML file for each databound web page.

Caution:

The DataBindings.cpx file maps JSF pages to their corresponding page definition files. If you change the name of a page definition file or a JSF page, JDeveloper does not automatically refactor the DataBindings.cpx file. You must manually update the page mapping in the DataBindings.cpx file.

The PageDef.xml file appears in the /src/view directory of the user interface project. The Application Navigator displays the file in the view package of the Application Sources node. 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.

For more information, see Chapter 13, "Working with Page Definition Files".

There are important differences in how the page definitions are generated for methods that return a single value and a collection.

A.8.1 PageDef.xml Syntax

The top-level 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.fod.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 A-4 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.

Example A-4 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:

  • <parameters> defines page-level parameters that are EL accessible. These parameters store information local to the web page request and may be accessed in the binding expressions.

  • <executables> defines the list of items (methods, view objects, and accessors) to execute during the prepareModel phase of the ADF page lifecycle. Methods to be executed are defined by <methodIterator>. The lifecycle performs the execute in the sequence listed in the <executables> section. Whether or not the method or operation is executed depends on its refresh or refreshCondition attribute value. Built-in operations on the data control are defined by:

    - <page> - definition for a nested page definition (binding container)

    - <iterator> - definition to a named collection in DataControls

    - <accessorIterator> - definition to get an accessor in a data control hierarchy

    - <methodIterator> - definition to get to an iterator returned by an invoked method defined by a methodAction in the same file

    - <variableIterator> - internal iterator that contains variables declared for the binding container

    - <invokeAction> - definition of which method to invoke as an executable

  • <bindings> refers to an entry in <executables> to get to the collection from which bindings extract/submit attribute level data.

Table A-2 describes the attributes of the top-level <pageDefinition> element.

Table A-2 Attributes of the PageDef.xml File <pageDefinition> Element

Element Syntax Attributes Attribute Description

<pageDefinition>

ControllerClass

Fully qualified class name 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

FindMode is for legacy (10.1.2) use only and indicates whether 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.

 

SkipValidation

Determines if data validation occurs. The supported values are:

  • true: skips data validation. Note that client-side binding level attribute validation still occurs. For example, validates non-null and type conversion errors.

  • false: validates all rows for all data controls referenced in the current page. This is the default value.

  • skipDataControls: validates the current rows of iterator bindings modified in the current page.

  • custom: set to custom if your application implements an instance of the oracle.binding.BindingContainerValidator interface and references it through an EL expression entry named CustomValidator in the binding container.

Setting a value for this attribute can be useful if you want to skip data validation on, for example, a train component. For more information see the "How to Create the Train Model" section of the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework

 

Viewable

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


Table A-3 describes the attributes of the child element of <parameters>.

Table A-3 Attributes of the PageDef.xml File <parameters> Element

Element Syntax Attributes Attribute Description

<parameter>

evaluate

Specifies when the parameter should be evaluated: eachUse, firstUse, or inPrepareModel.

 

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 that the variable value need not be provided.

  • Mandatory indicates that 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, which can be an EL expression.


Table A-4 describes the attributes of the PageDef.xml <executables> elements.

Table A-4 Attributes of the PageDef.xml File <executables> Element

Element Syntax Attributes Attribute Description

<accessorIterator>

Accessor

Specifies any other accessor defined by this binding.

 

Binds

Specifies the view or action to which the iterator is bound.

 

BeanClass

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

 

CacheResults

If true, manages the data collection between requests.

 

ChangeEventRate

Specifies the rate of events when a component is wired to data via this iterator and is in polling event mode.

 

DataControl

Interprets and 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

Used for ADF Business Components only. A boolean value determines whether 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 (default for ADF faces applications) - refresh occurs when another binding requires or refers to this executable. Since refreshing an executable may be a performance concern, you can set the refresh to occur only if deferred is used in a binding that is being rendered.

  • <default> - Always set to Deferred by default.

  • ifNeeded (default for all view technologies other than ADF Faces) - 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.

  • refreshAfter - Use to handle dependencies between executables. For example, you can set the condition so that this executable refreshes after another executable.

 

RefreshCondition

An EL expression that when resolved, determines when and whether the executable should be invoked. For example, ${!bindings.findAllServiceRequestIter.findModel} 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.

 

RefreshAfter

Specifies the condition after which the page should be refreshed.

 

RowCountThreshold

Specify a value to determine if a result set returns the number of rows you specify as a value. If you set RowCountThreshold to 0, the iterator returns the estimated row count in the result set by executing the count query. If you set RowCountThreshold to less than 0, the iterator does not execute the count query.

Set RowCountThreshold to a value greater than 0 if you want the iterator to execute the count query with the maximum value equal to the value you specify for RowCountThreshold. If the estimated row count is less than the value of RowCountThreshold, return the number of rows in the estimated row count. If the estimated row count is greater than the value of RowCountThreshold, return -1.

 

Sortable

Specifies whether the iterator is sortable or not.

<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 for <accessorIterator>.

 

RefreshCondition

See RefreshCondition for <accessorIterator>.

     

<iterator> and <methodIterator>

BeanClass

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

 

BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. Not used in current JDeveloper release.

 

Binds

See Binds for <invokeAction>.

 

CacheResults

See CacheResults for <accessorIterator>.

 

ChangeEventRate

Specifies the rate of events when a component is wired to data via this iterator and is in polling event mode.

 

DataControl

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

 

DefClass

Used internally by ADF.

 

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 for <accessorIterator>.

 

Refresh

See Refresh for <accessorIterator>.

 

RefreshAfter

Specifies the condition after which the page should be refreshed.

 

RefreshCondition

See RefreshCondition for <accessorIterator>.

 

RowCountThreshold

See RowCountThreshold for <accessorIterator>.

<page> and <variableIterator>

id

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

 

ChangeEventRate

Specifies the rate of events when a component is wired to data via this iterator and is in polling event mode.

 

path

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

 

Refresh

See Refresh for <accessorIterator>.

 

RefreshAfter

Specifies the condition after which the page should be refreshed.

 

RefreshCondition

See RefreshCondition for <accessorIterator>.


Table A-5 describes the attributes of the PageDef.xml <bindings> element.

Table A-5 Attributes of the PageDef.xml File <bindings> Element

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 is the session bean.

 

BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper.

 

DataControl

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

 

Execute

Used by default when you drop an operation from the Data Controls Panel in the automatically configured ActionListener property. It results in executing the action binding's operation at runtime.

 

InstanceName

Specifies the instance name for the action.

 

IterBinding

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

 

Outcome

Use if you want to use the result of a method action binding (once converted to a String) as a JSF navigation outcome name.

<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. This is used by earlier versions of JDeveloper.

 

ChangeEventPolicy

Specifies the event strategy for the component when run with ADS (Active Data Services). Can be specified as

push

poll

ppr

none

 

ControlClass

Used internally by ADF.

 

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 by ADF.

 

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 when 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. This is used by earlier versions of JDeveloper.

 

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 by ADF.

 

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 by ADF.

 

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 whether this list binding is for navigation, contains a static list of values or is an LOV type list.

 

NullValueFlag

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

 

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.

<ganttDataMap>

 

Maps the data binding XML for an ADF Faces gantt component.

<gaugeDataMap>

 

Maps the data binding XML for an ADF Faces gauge component.

<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 when 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. This is used by earlier versions of JDeveloper.

 

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 by ADF.

 

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 by ADF.

 

GraphPropertiesFile Name

An XML file that specifies the type of graph to use, for example, pie chart or bar graph. This XML file can be used to customize the visual properties of the graph. It contains graph attributes such as title, subtitle, footnote, graph type, legend area, and plot area. The default filename is BIGraphDef.xml.

 

GroupLabel

For master-detail forms, specifies the attribute that will be used to group data.

 

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.

 

SeriesLabel

Defines the attribute, based on which data will be clubbed.

 

SeriesType

Determines whether graph is for Single View(SINGLE_SERIES), or for MASTER_DETAIL.

<graphDataMap>

 

Wraps the data binding XML for an ADF Faces graph component.

<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 when 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. This is used by earlier versions of JDeveloper.

 

ControlClass

Used internally by ADF.

 

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 by ADF.

 

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 whether this list binding is for navigation, contains a static list of values, or is an LOV type list.

 

Mode

The value of this attribute determines if the list binding passes the actual value (Object) or the location of the value in an index (Index). For more information about setting this attribute, see Section 30.3.6, "What You May Need to Know About Values in a Selection List."

 

MRUCount

Specifies the number of items to display in a choice list when you want to provide a shortcut for the end-user to display their most recent selections. For example, a form might display a choice list of supplier ID values to drive a purchase order form. In this case, you can allow users to select from a list of their most recently view suppliers, where the number of supplier choices is determined by the count you enter. The default for the choice list is to display all values for the attribute and is specified by the count 0 (zero)."

 

MRUId

Specifies the String that will be the discriminator line for the MRU 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.

<mapThemeDataMap>

 

Wraps the data binding XML for an ADF Data Visualization geographic map 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 is the session bean.

 

BindingClass

This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper.

 

ClassName

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

 

DataControl

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

 

DefClass

Used internally by ADF.

 

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.

 

IsViewObjectMethod

Set to true if the instanceName contains an instance path relative to the associated data control's application module.

 

MethodName

Indicates the name of the operation on the given instance or 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.

<pivotTableDataMap>

 

Wraps the data binding XML for an ADF Faces pivot table component.

<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 when 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.This is used by earlier versions of JDeveloper.

 

CollectionModel

Accesses the CollectionModel object, the data model that is used by ADF table components. A table's value is bound to the CollectionModel attribute. The table wraps the result set from the iterator binding in a CollectionModel object. The CollectionModel attribute allows each item in the collection to be available within the table component using the var attribute.

 

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 by ADF.

 

DiscrValue

Indicates the discriminator value for a hierarchical type binding (type definition for a tree node). This value is used to determine whether 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.

 

TreeModel

The data model used by ADF Tree components. TreeModel extends CollectionModel to add support for container rows. Rows in the TreeModel may (recursively) contain other rows.


A.9 adfc-config.xml

The adfc-config.xml file is the source file for the ADF unbounded task flow that JDeveloper creates by default when you create an application using the Fusion Web Application (ADF) template. By default, JDeveloper stores the adfc-config.xml file in the following directory:

application_root\ViewController\Web Content\WEB-INF

If you create additional unbounded task flows, JDeveloper proposes the following file name for the source files of the additional unbounded task flows:

adfc-configN.xml

where N is a number that increments each time you create a new unbounded task flow. Alternatively, you choose the file name you want for an unbounded task flow's source file.

Each source file for an unbounded task flow contains the metadata for activities, control flow rules, and managed beans that you added to an unbounded task flow so that end users can interact with the Fusion web application to complete a task.

The XML schema definition file (XSD) that defines valid metadata entries for the adfc-config.xml file is adfc-config_1_0.xsd. The adfc-config_1_0.xsd file is stored in the adf-controller-schema.jar file in the following directory of your JDeveloper installation:

jdev_install\oracle_common\modules\oracle.adf.model_11.1.1

Use JDeveloper's XSD Visual Editor to view the adfc-config_1_0.xsd file. Using this editor, you can identify the valid metadata elements and attributes for the adfc-config.xml file.

Example A-5 shows the source file for an unbounded task flow where view activities, control flow rules, and so on have yet to be added.

Example A-5 Sample adfc-config.xml file with no entries

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
</adfc-config>

Figure A-4 shows the Diagram view of the Fusion Order Demo application's adfc-config.xml file. Example A-6 shows the corresponding source view of the unbounded task flow that appears in Figure A-4. For brevity, many metadata entries have been removed from Example A-6. However, instances of metadata that identify view activities (<view id>), a task flow call activity (<task-flow-call>), control flow rules (<control-flow-rule>), and managed beans (<managed-bean>) remain.

For more information about unbounded task flows, Chapter 18, "Getting Started with ADF Task Flows."

Figure A-4 Diagram View of Fusion Order Demo Application's adfc-config.xml File

Diagram View of Fusion Order Demo’s adfc-config.xml File

Example A-6 Source View of Fusion Order Demo Application's adfc-config.xml file

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller">
  <metadata-resource>/WEB-INF/adfc-config.xml</metadata-resource>
  <view id="home">
    <page>/home.jspx</page>
  </view>
  <task-flow-call id="checkout-task-flow">
    <task-flow-reference>
      <document>/WEB-INF/checkout-task-flow.xml</document>
      <id>checkout-task-flow</id>
    </task-flow-reference>
  </task-flow-call>
  <view id="updateUserInfo">
    <page>/account/updateUserInfo.jspx</page>
  </view>
  ...
  <task-flow-call id="myorders-task-flow">
    <task-flow-reference>
      <document>/WEB-INF/myorders-task-flow.xml</document>
      <id>myorders-task-flow</id>
    </task-flow-reference>
  </task-flow-call>
  <control-flow-rule>
    <from-activity-id>*</from-activity-id>
    <control-flow-case>
      <from-outcome>globalHome</from-outcome>
      <to-activity-id>home</to-activity-id>
    </control-flow-case>
   <!-- removed control flow cases for brevity -->
  </control-flow-rule>
  <managed-bean>
    <managed-bean-name>homePageBean</managed-bean-name>
    <managed-bean-class>oracle.fodemo.storefront.store.view.managed.HomeBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
  </managed-bean>
 <!-- removed managed beans for brevity -->
</adfc-config>

A.10 task-flow-definition.xml

The default file name that JDeveloper proposes for the source file of the first ADF bounded task flow that you create is task-flow-definition.xml. This file stores the metadata for a bounded task flow. It contains entries for each view activity, method call activity, task flow call, and so on that you add to the bounded task flow.

JDeveloper proposes the following file name for subsequent bounded task flows that you create:

task-flow-definitionN.xml

where N is a number that increments each time you create a new bounded task flow. Alternatively, you choose the file name you want for a bounded task flow's source file. By default, JDeveloper stores the task-flow-definition.xml file in the following directory:

application_root\ViewController\Web Content\WEB-INF

The XML schema definition files (XSD) that define the valid metadata entries for the source file of a bounded task flow are stored in the adf-controller-schema.jar file in the following directory of your JDeveloper installation:

jdev_install\oracle_common\modules\oracle.adf.model_11.1.1

Use JDeveloper's XSD Visual Editor to view these XSD files and identify the valid metadata elements and attributes for the source file of a bounded task flow.

Example A-7 shows the content of a source file when you create a new bounded task flow using the Create Task Flow dialog. The <task-flow-definition> element identifies this file as a bounded task flow. JDeveloper generates the <task-flow-definition> element when you select the Create as Bounded Task Flow check box in the Create Task Flow dialog. The value of the <task-flow-definition> element's id attribute (task-flow-definition) corresponds to the value that you enter in the Task Flow ID field of the Create Task Flow dialog. The <use-page-fragments/> element indicates that all view activities in this bounded task flow must be associated with page fragments. JDeveloper generates this entry when you select the Create with Page Fragments check box in the Create Task Flow dialog.

Example A-7 Sample task-flow-definition.xml with no entries

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  <task-flow-definition id="task-flow-definition">
    <use-page-fragments/>
  </task-flow-definition>
</adfc-config>

Example A-8 shows an abbreviated version of the Fusion Order Demo application's customer-registration-task-flow.xml file. Many metadata entries have been removed for brevity. However, you can view entries for the activities shown in the Structure window in Figure A-5.

For more information about bounded task flows, see Chapter 18, "Getting Started with ADF Task Flows".

Figure A-5 Abbreviated Structure View of the customer-registration-task-flow.xml File

Structure View of Customer Registration Task Flow

Example A-8 Abbreviated Source View of the customer-registration-task-flow.xml File

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.0">
  <task-flow-definition id="customer-registration-task-flow">
    <default-activity>userRegistrationCreate</default-activity>
    <transaction>
      <requires-transaction/>
    </transaction>
    <input-parameter-definition>
      <name>param_userType</name>
      <value>#{pageFlowScope.userType}</value>
      <class>java.lang.String</class>
      <required/>
    </input-parameter-definition>
    <managed-bean>
      <managed-bean-name>custRegBasicInformationBean</managed-bean-name>
      <managed-bean-class>....CustRegBasicInformationBean</managed-bean-class>
      <managed-bean-scope>view</managed-bean-scope>
      <managed-property>
        <property-name>allItemsIteratorName</property-name>
        <value>AvailableCategoriesShuttleListIterator</value>
      </managed-property>
    </managed-bean>
    <exception-handler>errorPage</exception-handler>
    <view id="reviewCustomerInfo">
      <display-name>Review</display-name>
      <page>/account/reviewCustomerInfo.jsff</page>
      <train-stop>
        <display-name>Review</display-name>
      </train-stop>
    </view>
    <task-flow-return id="rollbackReturn">
      <outcome>
        <name>cancelCreateCust</name>
        <rollback/>
      </outcome>
    </task-flow-return>
    <method-call id="createAddress">
      <method>#{bindings.CreateInsert.execute}</method>
      <outcome>
        <fixed-outcome>editAddress</fixed-outcome>
      </outcome>
    </method-call>
    <view id="paymentOptionDetails">
      <page>/account/paymentOptionDetails.jsff</page>
    </view>
    <parent-action id="Exit">
      <parent-outcome>globalHome</parent-outcome>
    </parent-action>
    <train/>
    <control-flow-rule>
      <from-activity-id>*</from-activity-id>
      <control-flow-case>
        <from-outcome>exitRegistration</from-outcome>
        <to-activity-id>Exit</to-activity-id>
      </control-flow-case>
      <control-flow-case>
        <from-outcome>cancelRegistration</from-outcome>
        <to-activity-id>rollbackReturn</to-activity-id>
      </control-flow-case>
    </control-flow-rule>
    <control-flow-rule>
      <from-activity-id>userRegistrationCreate</from-activity-id>
      <control-flow-case>
        <from-outcome>editBasicInfo</from-outcome>
        <to-activity-id>basicInformation</to-activity-id>
      </control-flow-case>
    </control-flow-rule>
    <use-page-fragments/>
  </task-flow-definition>
</adfc-config>

A.11 adf-config.xml

JDeveloper generates the adf-config.xml file when you create an application using the Fusion Web Application (ADF) template. It stores the file in the following directory:

application_root\.adf\META-INF

The adf-config.xml file specifies application-level settings that are usually determined at deployment and are often changed at runtime. You can use a deployment profile to specify settings that are used at application deploy time. You can change some of the settings at runtime using Oracle Enterprise Manager.

Examples of tasks that you can accomplish by changing settings in the adf-config.xml file include the following:

  • Enable or disable the validation of ADF Controller metadata

  • Replicate memory scope if you deploy your Fusion web application in a clustered environment

  • Configure properties to manage the caching of resource bundles where your application uses EL expressions to retrieve strings at runtime from resource bundles

    The properties that you can configure are:

    • initial-size

      Specifies the initial number of resource bundles that your application can cache. The default value is 100.

    • max-size

      Specifies the maximum number of resource bundles that your application can cache. The default value is 100.

    • load-factor

      The default value is 0.75.

    • expire-time

      The default value is 43200 seconds (12 hours).

      You specify these properties as attribute values of the <resource-bundle-cache> element in the adf-config.xml file. Example A-9 demonstrates how you might configure these values for your application in the adf-config.xml file.

    As an alternative to configuring the caching of resource bundles in the adf-config.xml file, you can specify the resource bundle caching properties as parameters for the Java Virtual Machine (JVM). If you specify the properties as parameters for the JVM, the changes apply to all applications managed by the JVM. For this reason, we recommend that you configure the resource bundle caching properties in the adf-config.xml file for you application. Use the following property names if you decide to specify the resource bundle caching properties as parameters for the JVM:

    • resource-bundle-cache-initial-size

    • resource-bundle-cache-max-size

    • resource-bundle-cache-load-factor

    • resource-bundle-cache-expire-time

At runtime, the Fusion web application loads the adf-config.xml file from the META-INF directory. If the Fusion web application finds more than one adf-config.xml file, it stops loading the file and logs a warning.

The following tasks modify or require you to modify the adf-config.xml file:

Example A-9 shows example entries for an application's adf-config.xml file.

Example A-9 Sample adf-config.xml File

<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config"
            xmlns:sec="http://xmlns.oracle.com/adf/security/config">
  <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <JaasSecurityContext initialContextFactoryClass="oracle.adf.share.security.JAASInitialContextFactory"
                         jaasProviderClass="oracle.adf.share.security.providers.jps.JpsSecurityContext"
                         authorizationEnforce="true"
                         authenticationRequire="true"/>
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
                            credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
  </sec:adf-security-child>
  <adf-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config">
    <savepoint-datasource>java:comp/env/jdbc/FODDS</savepoint-datasource>
    <enable-implicit-savepoints>true</enable-implicit-savepoints>
  </adf-controller-config>
  <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/config">
    <persistent-change-manager>
      <persistent-change-manager-class>oracle.adf.view.rich.change.MDSDocumentChangeManager</persistent-change-manager-class>
    </persistent-change-manager>
    <taglib-config>
      <taglib uri="http://xmlns.oracle.com/adf/faces/rich">
        <tag name="calendar">
          <attribute name="activeDay">
            <persist-changes>true</persist-changes>
          </attribute>
        </tag>
        <!-- Additional tags omitted to make this example concise -->
        <tag name="table">
          <attribute name="filterVisible">
            <persist-changes>true</persist-changes>
          </attribute>
        </tag>
      </taglib>
    </taglib-config>
  </adf-faces-config>
  <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config" version="11.1.1.000">
      <cust-config>
        <match path="/">
          <customization-class name="oracle.adf.share.config.UserCC"/>
        </match>
      </cust-config>
    </mds-config>
  </adf-mds-config>
  <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults rowLimit="100"/>
    <startup>
      <amconfig-overrides>
        <config:Database jbo.SQLBuilder="Oracle" jbo.locking.mode="optimistic"/>
      </amconfig-overrides>
    </startup>
  </adf-adfm-config>
<!-- Properties to manage the caching of a resource bundle in your application -->
<adf-resourcebundle-config xmlns="http://xmlns.oracle.com/adf/resourcebundle/config">
    <applicationBundleName>
        path-to-resource-bundle/bundle-name
    </applicationBundleName>
    <resource-bundle-cache initial-size="20" max-size="100" expire-time="30000" load-factor=".75"/>
    <bundleList>
      <bundleId override="true">
                package.BundleID
      </bundleId>
    </bundleList>
  </adf-resourcebundle-config>
</adf-config>

A.12 adf-settings.xml

The adf-settings.xml file holds project-level and library-level settings such as ADF Faces help providers and ADF Controller phase listeners.

The configuration settings for adf-settings.xml are fixed and cannot be changed during or after application deployment. There can be multiple adf-settings.xml files in an application. The users of adf-settings.xml files are responsible for merging the contents of their configuration.

JDeveloper creates an adf-settings.xml file when you:

  • Create an application using the Fusion Web Application (ADF) template

  • Add ADF Page Flow (ADF Controller) to the technology scope of an existing project

By default, JDeveloper stores the adf-settings.xml file in the following directory:

application_root\ViewController\src\META-INF

The following tasks modify or require you to modify the adf-settings.xml file:

Example A-10 shows a sample adf-setting.xml file with settings configured for a phase listener and a help provider.

Example A-10 Sample adf-settings.xml File

<?xml version="1.0" encoding="windows-1252" ?>
<adf-settings xmlns="http://xmlns.oracle.com/adf/config">
  <adfc-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config">
    <lifecycle>
      <phase-listener>
        <listener-id>FODPhaseListener</listener-id>
        <class>oracle.fodemo.storefront.listeners.FODPhaseListener</class>
      </phase-listener>
    </lifecycle>
  </adfc-controller-config>
  <adf-faces-config>
    <help-provider prefix="MYAPP">
      <help-provider-class>oracle.fodemo.storefront.MyHelpProvider</help-provider-class>
      <property>
        <property-name>myCustomProperty</property-name>
        <value>someValue</value>
      </property>
    </help-provider>
  </adf-faces-config>
</adf-settings>

A.13 web.xml

Oracle ADF has specific configuration settings for the standard web.xml deployment descriptor file.

When you create a project in JDeveloper that uses JSF technology, a starter web.xml file with default settings is created for you in the /WEB-INF folder. 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:

  • ADF Library resource servlet and mapping: Serves up web application resources (images, style sheets, JavaScript libraries) from ADF Library JAR files on the application class path.

    By default, static web application resources (including resources in ADF Libraries), such as images, have a staleness period setting of 364 days. This staleness period setting requests that the client not make a request to the server to validate the static web application resources until one of the following events occur:

    • Staleness period expires

    • Browser cache no longer contains the static resource

    • User executes a page refresh

    If the client does make a request to the server and the resources have not changed, the server returns a HTTP 304 response (Not Modified) with no body.

    You can override the staleness period setting of 364 days for all static web application resources in ADF Libraries by adding initialization parameters to the web.xml file. Example A-11 demonstrates how to set these initialization parameters using a number of examples.

    Example A-11 Staleness Settings for Static Resources in web.xml

    <!-- Expires all static resources in 30 days --> 
     <init-param> 
       <param-name>expires</param-name> 
       <param-value>60*60*24*30</param-value>  
     </init-param> 
     
    <!-- Expires static resources with the .js file extension in 1 day --> 
     <init-param> 
       <param-name>expires.js</param-name> 
       <param-value>60*60*24</param-value>     
     </init-param> 
     
    <!-- Turns off staleness setting. Use for testing --> 
     <init-param> 
       <param-name>expires</param-name> 
       <param-value>OFF</param-value>     
     </init-param> 
    

    Example A-12 shows the default file extensions. You can add additional file extensions by configuring the extensions parameter value to include the file extensions that you want. Note that you must prepend and append "." to the file extension. Example A-12 also shows how you specify visibility for cache control.

    Example A-12 Specifying Additional File Extensions and Cache Control

    <!-- Specify file extensions for a number of different file formats -->
     <init-param> 
       <param-name>extensions</param-name> 
       <param-value>.png.jpg.jpeg.gif.js.css.</param-value> 
     </init-param> 
     
    <!-- Specify visibility for cache control, for example -->
     <init-param> 
       <param-name>visibility</param-name> 
       <param-value>Public</param-value> 
     </init-param> 
    
  • JSF servlet and mapping: The servlet javax.faces.webapp.FacesServlet that manages the request-processing lifecycle for web applications utilizing JSF to construct the user interface.

  • ADF Faces filter and mapping: A servlet filter to ensure that ADF Faces is properly initialized by establishing a AdfFacesContext object. This filter also processes file uploads.

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.

For more information, see the "ADF Faces Configuration" appendix in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

A.14 logging.xml

ADF Logger is a diagnostic tool that you can use in JDeveloper to capture runtime traces messages when you debug an application. You configure the use of this tool by editing the logging.xml file.

For more information about the logging.xml file and using the ADF Logger, see Section 36.6, "Using the ADF Logger".