A Oracle ADF XML Files

This appendix provides a 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 About ADF Metadata Files

Metadata files in a 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 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 Go to 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 files is through the Structure window and Properties window. In the Structure window, you can choose an element and in the Properties window, you can define attribute values for the element, often by choosing among dropdown menu choices. Use this appendix to learn the choices you can choose 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

This image is described in the surrounding text

A.2.1 Oracle ADF Data Control Files

In a Fusion web application containing ADF Business Components, 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, 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 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 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 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 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 Developing Web User Interfaces with Oracle ADF Faces.

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

This image is described in the surrounding text

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 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 ADF Model layer usage, see 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, the Summit sample application for Oracle ADF stores the Model.jpx file in the .src/oracle/summit/model subdirectory of the Model project.

The following example displays a sample default.jpx file.

<JboProject
   xmlns="http://xmlns.oracle.com/bc4j"
   Name="Model"
   Version="12.1.2.66.11"
   SeparateXMLFiles="true"
   PackageName="oracle.summit.model">
   <DesignTime>
      <Attr Name="_appModuleNames2"
         Value="oracle.summit.model.services.BackOfficeAppModule"/>
      <Attr Name="_jprName" Value="../../../../Model.jpr"/>
      <Attr Name="_appModuleNames1"
         Value="oracle.summit.model.services.CustomerSelfServiceAppModule"/>
      <Attr Name="_appModuleNames0"
         Value="oracle.summit.model.services.SummitAppModule"/>
      <Attr Name="_jbo.TypeMapEntries" Value="Java"/>
      <Attr Name="_NamedConnection" Value="summit_adf"/>
   </DesignTime>
   <Containee
      Name="assoc"
      PackageName="oracle.summit.model.entities.assoc"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_AS" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="entities"
      PackageName="oracle.summit.model.entities"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_EO" Value="true"/>
         <Attr Name="_VO" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="services"
      PackageName="oracle.summit.model.services"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_AM" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="links"
      PackageName="oracle.summit.model.views.links"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VL" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="readonly"
      PackageName="oracle.summit.model.views.readonly"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VO" Value="true"/>
      </DesignTime>
   </Containee>
   <Containee
      Name="views"
      PackageName="oracle.summit.model.views"
      ObjectType="JboPackage">
      <DesignTime>
         <Attr Name="_VO" Value="true"/>
      </DesignTime>
   </Containee>
</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 /Model/src/oracle/summit/model/services/common directory of the Summit ADF sample application's Model project, you see the configurations for its application modules. For details about editing the configurations, see How to Change Your Application Module's Runtime Configuration and Setting Pool Configuration Parameters.

Example A-1 displays a sample bc4j.xcfg file from the Summit ADF sample application.

Example A-1 Sample bc4j.xcfg File

<?xml version = '1.0' encoding = 'UTF-8'?>
<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">
   <AppModuleConfigBag ApplicationName="oracle.summit.model.services.SummitAppModule">
      <AppModuleConfig name="SummitAppModuleLocal" DeployPlatform="LOCAL" JDBCName="summit_adf" jbo.project="oracle.summit.model.Model" java.naming.factory.initial="oracle.jbo.common.
       JboInitialContextFactory" ApplicationName="oracle.summit.model.services.SummitAppModule">
         <Database jbo.TypeMapEntries="Java"/>
         <Security AppModuleJndiName="oracle.summit.model.services.SummitAppModule"/>
      </AppModuleConfig>
      <AppModuleConfig name="SummitAppModuleShared" DeployPlatform="LOCAL" JDBCName="summit_adf" jbo.project="oracle.summit.model.Model" java.naming.factory.initial="oracle.jbo.common.JboInitialContextFactory"
                                 ApplicationName="oracle.summit.model.services.SummitAppModule">
         <AM-Pooling jbo.ampool.isuseexclusive="false" jbo.ampool.maxpoolsize="1"/>
         <Database jbo.TypeMapEntries="Java"/>
         <Security AppModuleJndiName="oracle.summit.model.services.SummitAppModule"/>
      </AppModuleConfig>
   </AppModuleConfigBag>
   <AppModuleConfigBag ApplicationName="oracle.summit.model.services.CustomerSelfServiceAppModule">
      <AppModuleConfig name="CustomerSelfServiceLocal" jbo.project="oracle.summit.model.Model" ApplicationName="oracle.summit.model.services.CustomerSelfServiceAppModule" 
                                          DeployPlatform="LOCAL" JDBCName="summit_adf">
         <Database jbo.TypeMapEntries="Java"/>
         <Security AppModuleJndiName="oracle.summit.model.services.CustomerSelfServiceAppModule"/>
      </AppModuleConfig>
      <AppModuleConfig name="CustomerSelfServiceShared" jbo.project="oracle.summit.model.Model" ApplicationName="oracle.summit.model.services.CustomerSelfServiceAppModule" 
                                         DeployPlatform="LOCAL" JDBCName="summit_adf">
         <AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.isuseexclusive="false"/>
         <Database jbo.TypeMapEntries="Java"/>
         <Security AppModuleJndiName="oracle.summit.model.services.CustomerSelfServiceAppModule"/>
      </AppModuleConfig>
   </AppModuleConfigBag>
   <AppModuleConfigBag ApplicationName="oracle.summit.model.services.BackOfficeAppModule">
      <AppModuleConfig name="BackOfficeAppModuleLocal" jbo.project="oracle.summit.model.Model" ApplicationName="oracle.summit.model.services.BackOfficeAppModule" DeployPlatform="LOCAL" JDBCName="summit_adf">
         <Database jbo.TypeMapEntries="Java"/>
         <Security AppModuleJndiName="oracle.summit.model.services.BackOfficeAppModule"/>
      </AppModuleConfig>
      <AppModuleConfig name="BackOfficeAppModuleShared" jbo.project="oracle.summit.model.Model" ApplicationName="oracle.summit.model.services.BackOfficeAppModule" DeployPlatform="LOCAL" JDBCName="summit_adf">
         <AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.isuseexclusive="false"/>
         <Database jbo.TypeMapEntries="Java"/>
         <Security AppModuleJndiName="oracle.summit.model.services.BackOfficeAppModule"/>
      </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 catalog 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.

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 Properties window and choose the desired parameter in the Structure window.)

A.7.1 DataBindings.cpx Syntax

The top level element of the DataBindings.cpx file is <Application>. For example:

<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://xmlns.oracle.com/adfm/application"
             version="11.1.1.56.60" id="DataBindings" SeparateXMLFiles="false"
             Package="oracle.summit.view" ClientType="Generic">

Figure A-3 shows the structure definition of the DataBindings.cpx file in the Summit standalone sample applications for Oracle ADF.

Figure A-3 Structure of the DataBindings.cpx File

This image is described in the surrounding text

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-2 shows the syntax for the DataBindings.cpx file in the Summit ADF sample 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-2 Sample DataBindings.cpx File

<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://xmlns.oracle.com/adfm/application"
             version="11.1.1.56.60" id="DataBindings" SeparateXMLFiles="false"
             Package="oracle.summit.view" ClientType="Generic">
  <definitionFactories>
    <factory nameSpace="http://xmlns.oracle.com/adf/controller/binding"
             className="oracle.adf.controller.internal.binding.TaskFlowBindingDefFactoryImpl"/>
    <dtfactory className="oracle.adf.controller.internal.dtrt.binding.BindingDTObjectFactory"/>
    <factory nameSpace="http://xmlns.oracle.com/adfm/dvt"
             className="oracle.adfinternal.view.faces.dvt.model.binding.FacesBindingFactory"/>
  </definitionFactories>
  <pageMap>
    <page path="/index.jsf" usageId="oracle_summit_view_indexPageDef"/>
    <page path="/Customers.jsff" usageId="oracle_summit_view_CustomersPageDef"/>
    <page path="/orders/Orders.jsff"
          usageId="oracle_summit_view_OrdersPageDef"/>
    <page path="/carousel/InventoryControl.jsff" usageId="oracle_summit_view_InventoryControlTestPageDef"/>
  </pageMap>
  <pageDefinitionUsages>
    <page id="oracle_summit_view_CustomersPageDef"
          path="oracle.summit.view.pageDefs.CustomersPageDef"/>
    <page id="oracle_summit_view_indexPageDef"
          path="oracle.summit.view.pageDefs.indexPageDef"/>
    <page id="oracle_summit_view_OrdersPageDef"
          path="oracle.summit.view.pageDefs.OrdersPageDef"/>
    <page id="oracle_summit_view_InventoryControlTestPageDef"
          path="oracle.summit.view.pageDefs.InventoryControlPageDef"/>
  </pageDefinitionUsages>
  <dataControlUsages>
    <BC4JDataControl id="BackOfficeAppModuleDataControl"
                     Package="oracle.summit.model.services"
                     FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
                     SupportsTransactions="true" SupportsFindMode="true"
                     SupportsRangesize="true" SupportsResetState="true"
                     SupportsSortCollection="true"
                     Configuration="BackOfficeAppModuleLocal"
                     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 panel 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 Applications window 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 Properties window and choose the desired parameter in the Structure window.

For more information, see 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="11.1.1.59.23" id="<pagename>PageDef"
                Package="oracle.summit.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.

The following example 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.

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

      Note:

      Only use invokeAction when your application does not use the ADF Controller module from the Fusion web application technology stack. If your application uses the ADF Controller module, Oracle recommends that you use a task flow method call activity, as described in Using Method Call Activities.

  • <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 attribute validation on the client side at the binding level 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 Developing Web User Interfaces with Oracle ADF Faces

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 specifies that the parameter value must be provided at runtime using Java or an EL expression. Failure to provide a value for a mandatory parameter or binding leads to an exception being thrown during binding validation.

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. Typically, when you create a component by dragging an object from the Data Controls panel, the range size is set to 25. 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. If the RangeSize attribute is not specified at all, all available objects are returned.

Refresh

Determines when to invoke the executable. Oracle recommends that you do not change from the default value (deferred) for the Refresh attribute and that you do use an EL expression for the RefreshCondition attribute to determine if an executable should be refreshed. For completeness' sake, the following is the list of valid attribute values:

  • always: Invokes the executable each time the binding container is prepared. This occurs when the page displays and when the user submits changes, or when the application posts back to the page.

  • deferred: Refresh occurs when another binding requires or refers to this executable. Since refreshing an executable may impact performance, you can set the refresh to occur only if deferred is used in a binding that is being rendered. This is the default value for ADF Faces applications.

  • <default>: Always set to deferred by default.

  • ifNeeded: 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 avoids duplicate refreshes. This is the default value for all view technologies other than ADF Faces.

  • never: The application itself calls refresh on the executable during one of the controller phases and does not want the framework to refresh the executable at all.

  • prepareModel: Invokes the executable each time the page's binding container is prepared.

  • prepareModelIfNeeded: Invokes the executable during the Prepare Model phase if this executable has not been refreshed to this point. See also ifNeeded.

  • renderModel: Invokes the executable each time the page is rendered.

  • renderModelIfNeeded: Invokes the executable during the page's Render Model phase on the condition that it is needed. See also ifNeeded.

RefreshCondition

An EL expression that determines if the executable should be refreshed. Use with the executable's Refresh attribute to make the refresh of the executable predictable. The Refresh attribute is evaluated if the EL expression that you set for RefreshCondition returns true.

RefreshAfter

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

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>

 

Only use <invokeAction> when your application does not use the ADF Controller module from the Fusion web application technology stack. Oracle recommends that you use a task flow method call activity, as described in Using Method Call Activities, if your application uses the ADF Controller module.

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.

<gantt>

ChangeEventPolicy

Identifies the update policy for the component. Valid values are none, ppr, and push. The default is ppr.

xmlns

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.

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.

ganttDataMap

Wraps the data binding XML for the ADF Faces Gantt chart component.

<gauge>

type

Identifies the gauge type.

ledStyle

Identifies the LED style for the gauge.

ChangeEventPolicy

Identifies the update policy for the component. Valid values are none, ppr, and push. The default is ppr.

xmlns

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.

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.

gaugeDataMap

Wraps the data binding XML for the ADF Faces gauge component.

<graph>

type

Identifies the graph type.

ChangeEventPolicy

Identifies the update policy for the component. Valid values are none, ppr, and push. The default is ppr.

xmlns

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.

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.

graphDataMap

Wraps the data binding XML for the 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 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 choose 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.

<mapTheme>

ChangeEventPolicy

Identifies the update policy for the component. Valid values are none, ppr, and push. The default is ppr.

xmlns

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.

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.

mapThemeDataMap

Wraps the data binding XML for the 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.

<pivotTable>

ChangeEventPolicy

Identifies the update policy for the component. Valid values are none, ppr, and push. The default is ppr.

xmlns

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.

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.

pivotTableDataMap

Wraps the data binding XML for the ADF Data Visualization 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 ADF Fusion Web Application 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_12.1.2

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.

The following example shows the source file for an unbounded task flow where view activities, control flow rules, and so on have yet to be added.

<?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 Summit sample application for ADF task flows' adfc-config.xml file. Example A-3 shows the corresponding source view of the unbounded task flow that appears in Figure A-4.

For more information about unbounded task flows, see Getting Started with ADF Task Flows .

Figure A-4 Diagram View of Summit ADF Task Flow Sample Application´s adfc-config.xml File

This image is described in the surrounding text

Example A-3 Source View of Summit ADF Task Flow Sample Application´s adfc-config.xml File

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  <view id="index">
    <page>/index.jsf</page>
  </view>
  <managed-bean id="__1">
    <managed-bean-name>login</managed-bean-name>
    <managed-bean-class>oracle.summit.bean.LoginBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
  </managed-bean>
  <managed-bean id="__2">
    <managed-bean-name>WelcomePageBean</managed-bean-name>
    <managed-bean-class>oracle.summit.bean.WelcomePageBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
  </managed-bean>
</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_12.1.2

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.

The following example 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 checkbox 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 checkbox in the Create Task Flow dialog.

<?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-4 shows the Summit ADF task flow sample application's customers-task-flow-definition.xml file. You can view entries for the activities shown in the Structure window in Figure A-5.

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

Figure A-5 Structure View of the customers-task-flow-definition.xml File

This image is described in the surrounding text

Example A-4 Source View of the customers-task-flow-definition.xml File

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  <task-flow-definition id="customer-task-flow-definition">
    <default-activity id="__1">isCustomerLogin</default-activity>
    <managed-bean id="__11">
      <managed-bean-name id="__9">CustomersBackingBean</managed-bean-name>
      <managed-bean-class id="__10">oracle.summit.backing.CustomersBackingBean</managed-bean-class>
      <managed-bean-scope id="__8">backingBean</managed-bean-scope>
    </managed-bean>
    <view id="Customers">
      <page>/customers/Customers.jsff</page>
    </view>
    <method-call id="SetCurrentRowWithKeyValue">
      <method>#{bindings.setCurrentRowWithKeyValue.execute}</method>
      <outcome>
        <fixed-outcome>setCurrentRowWithKey</fixed-outcome>
      </outcome>
    </method-call>
    <router id="isCustomerLogin">
      <case id="__4">
        <expression>#{securityContext.userInRole['Application Customer Role']}</expression>
        <outcome>customerLogin</outcome>
      </case>
      <default-outcome>notCustomerLogin</default-outcome>
    </router>
    <control-flow-rule id="__2">
      <from-activity-id>SetCurrentRowWithKeyValue</from-activity-id>
      <control-flow-case id="__3">
        <from-outcome>setCurrentRowWithKey</from-outcome>
        <to-activity-id>Customers</to-activity-id>
      </control-flow-case>
    </control-flow-rule>
    <control-flow-rule id="__5">
      <from-activity-id>isCustomerLogin</from-activity-id>
      <control-flow-case id="__6">
        <from-outcome>notCustomerLogin</from-outcome>
        <to-activity-id>Customers</to-activity-id>
      </control-flow-case>
      <control-flow-case id="__7">
        <from-outcome>customerLogin</from-outcome>
        <to-activity-id>SetCurrentRowWithKeyValue</to-activity-id>
      </control-flow-case>
    </control-flow-rule>
    <critical/>
    <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 ADF Fusion Web Application template. JDeveloper stores this application-level descriptor file in the following directory:

application_root\.adf\META-INF

In JDeveloper, you can locate the file in the Application Resources panel of the Applications window by expanding the Descriptors > ADF META-INF nodes.

The adf-config.xml file specifies application-level settings that you define during development. 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-5 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, consider configuring 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-5 shows example entries for an application's adf-config.xml file.

Example A-5 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">
    <CredentialStoreContext credentialStoreClass=
                                "oracle.adf.share.security.providers.jps.CSFCredentialStore"
                                      credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
    <!-- The Configure ADF Security wizard modifies JaasSecurityContext settings -->
    <JaasSecurityContext initialContextFactoryClass=
                                "oracle.adf.share.security.JAASInitialContextFactory"
                         jaasProviderClass=
                                "oracle.adf.share.security.providers.jps.JpsSecurityContext"
                         authorizationEnforce="true"
                         authenticationRequire="true"/>
  </sec:adf-security-child>
  <adf-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config">
    <savepoint-datasource>java:comp/env/jdbc/summit_adfDS</savepoint-datasource>
    <enable-implicit-savepoints>true</enable-implicit-savepoints>
    <unauthorized-region-taskflow>/WEB-INF/task-flow-definition.xml</unauthorized-region-taskflow>
  </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 ADF Fusion Web Application template

  • Add ADF Page Flow (ADF Controller) as a feature to 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:

For information about how to edit the adf-settings.xml file, see the "How to Configure for ADF Faces in adf-settings.xml" section in Developing Web User Interfaces with Oracle ADF Faces.

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

Example A-6 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>SummitPhaseListener</listener-id>
        <class>oracle.summit.listeners.SummitPhaseListener</class>
      </phase-listener>
    </lifecycle>
  </adfc-controller-config>
  <adf-faces-config>
    <help-provider prefix="MYAPP">
      <help-provider-class>oracle.summit.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 Applications window 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. The following example demonstrates how to set these initialization parameters using a number of examples.

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

    The following example 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. The example also shows how you specify visibility for 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 Developing Web User Interfaces with Oracle ADF Faces.

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 Using the ADF Logger.