Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 1 (11.1.1.5)

Part Number E15524-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

61 Creating Customizable Applications

Oracle Metadata Services (MDS) framework allows you to create customizable applications. This chapter describes how to configure your application at design time so that it can be customized.

This chapter also provides information about how to perform runtime customizations.

This chapter includes the following sections:

61.1 Introduction to Creating Customizable Applications

With the customization features provided by Oracle Metadata Services (MDS), both developers and customers can customize Oracle Fusion applications. Customizing an application involves taking a generalized application and making modifications to suit the needs of a particular group, such as a specific industry or site.

A customized application contains a base application and one or more layers of customized metadata content. MDS stores the customized metadata objects in a metadata repository and retrieves them at run time to reveal the customized application. When a customized application is launched, the customized content is applied over the base content.

For more information about MDS repositories (database and file-based) and metadata archives (MAR), see the "Managing the Metadata Repository" chapter in the Oracle Fusion Applications Administrator's Guide. For more information about customization, see the "Customizing Applications with MDS" chapter in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. For information about the ways in which developers and end users can customize the application, see the "Customizing and Extending Oracle Fusion Applications" chapter in the Oracle Fusion Applications Extensibility Guide.

You must perform the following tasks in the order shown in your JDeveloper application workspace to ensure that your pages can be customized by customers. You must complete all the non-optional tasks.

  1. Set project properties to enable user and seeded customizations.

  2. Configure the persistence change manager parameter to use the composer change manger.

  3. Define the customization layers and their order of precedence.

  4. Authorize runtime customization of pages and task flows.

  5. (Optional) Restrict customizations for specific components on a page.

  6. Set up resource bundles for translation.

  7. Enable application pages for runtime customization.

  8. (Optional) Enable user customization of the user interface (UI) shell template.

  9. Create an IDE connection to your database (in addition to the application connection) to enable access to layer values.

Once the application is configured to enable customizations, customizations can be created in two different ways:

End users are also able to customize the navigator menu that displays in the UI Shell global area.

61.2 Setting Project Properties to Enable User and Seeded Customizations

To allow JDeveloper-based and Oracle Composer-based customizations for your application, you must enable user and seeded customizations.

61.2.1 How to Set Project Properties to Enable User and Seeded Customizations

To enable user customization, you must configure the view project to allow user customizations, and you must configure the view project to persist the customized metadata objects to a MDS repository so that the objects are available across sessions. You must also enable seeded customizations so that the page fragments and JSPX pages that you create will be configured to allow customizations.

Note:

ADF components (such as controller, model, and business components objects) must have a unique identifier so that they can be customized. ADF components that are generated by JDeveloper are created with identifiers by default, with the exception of fragments and pages in your user interface projects. To cause JDeveloper to generate identifiers for components on pages that you create in your user interface projects, you must explicitly specify this at the project level by enabling seeded customizations.

To set project properties for your view project:

  1. In the Application Navigator in JDeveloper, right-click your view project and choose Project Properties.

  2. In the Project Properties dialog, select ADF View to display the ADF View settings.

  3. Select Enable User Customizations and select Across Sessions Using MDS, as shown in Figure 61-1.

  4. Select Enable Seeded Customizations.

    Figure 61-1 Project Properties — ADF View

    Project Properties - ADF View
  5. Click OK.

61.3 Configuring the Persistence Change Manager

Before you can define customization layers, you must configure the persistence change manager parameter to use the composer change manger

61.3.1 How to Configure the Persistence Change Manager

When you enabled user customizations across sessions using MDS by completing the procedure in Section 61.2, "Setting Project Properties to Enable User and Seeded Customizations," the IDE added the CHANGE_PERSISTENCE context parameter to the view project's web.xml file, and set the parameter to use the filtered persistence change manager. You must modify this parameter to use the composer change manager, and you must add the composer filter and its mapping.

Before you begin:

Modify your view project's properties to enable user customizations across sessions using MDS as described in Section 61.2, "Setting Project Properties to Enable User and Seeded Customizations."

To configure the persistence change manager:

  1. Expand the WEB-INF node for your view project, right-click the web.xml node and choose Open.

  2. In the source editor, change the org.apache.myfaces.trinidad.CHANGE_PERSISTENCE context parameter value to oracle.adf.view.page.editor.change.ComposerChangeManager, as shown in the following code.

    <context-param>
      <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
      <param-value>
        oracle.adf.view.page.editor.change.ComposerChangeManager
      </param-value>
    </context-param>
    
  3. Add the filter and filter-mapping elements for the WebCenterComposerFilter class, as shown in bold in Example 61-1.

    Note:

    Filters must be configured in the following order.
    1. JpsFilter

    2. ApplSessionFilter

    3. WebCenterComposerFilter

    4. ADFBindingFilter

    Example 61-1 composerFilter and Mappings in web.xml

    ....
      <!-- composerFilter goes here -->
      <filter>
        <filter-name>composerFilter</filter-name>
        <filter-class>
          oracle.adf.view.page.editor.webapp.WebCenterComposerFilter
        </filter-class>
      </filter>
      <filter>
        <filter-name>adfBindings</filter-name>
        <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
      </filter>
    .....
    
      <!-- composerFilter mapping goes here -->
      <filter-mapping>
        <filter-name>composerFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
      </filter-mapping>
      <filter-mapping>
        <filter-name>adfBindings</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
      </filter-mapping>
    ....
    
  4. Enable sessions for the JSPX pages and task flows that you create in your view project as described in Section 48.2.1, "How to Configure Your Project to Use Application User Sessions."

    This step, among other modifications, adds the Applications Core and Web Service Data Control libraries to your project, which you need to complete the tasks to prepare your application for customization.

61.4 Defining the Customization Layers

A customizable application can have multiple customization layers, such as Global, Site, and User. You need to define the application's customization layers and their order of precedence.

For information about customization layers, see the "Understanding Customization Layers" section in the Oracle Fusion Applications Extensibility Guide.

61.5 Authorizing Runtime Customization of Pages and Task Flows

When a user opens an application page in a browser, the page opens in view mode. Additionally, Oracle Composer provides access to another mode that enables users with appropriate privileges to customize and personalize application pages and to save the changes as customizations that are available for all users accessing the page. Users can also be granted the privilege to edit a task flow at runtime.

For information about using Oracle Composer to customize pages, see the "Customizing Existing Pages" chapter of the Oracle Fusion Applications Extensibility Guide.

61.5.1 How to Authorize Runtime Customization of Pages and Task Flows

You modify the resource grants in the jazn-data.xml file to authorize runtime customization of pages and task flows.

To authorize pages and task flows for runtime customizations:

  1. Open the jazn-data.xml file, which is located in Application Resources > Descriptors > META-INF.

    Tip:

    If the jazn-data.xml file does not exist, you can create it by right-clicking the META-INF folder, selecting New Oracle Deployment Descriptor, selecting jazn-data.xml, and clicking Finish.
  2. In the overview editor, click the Resource Grants navigation tab, as shown in Figure 61-2.

    Figure 61-2 Resource Grants Tab in jazn-data.xml Overview

    Resource Grants Tab in jazn-data.xml Overview
  3. Select Web Page from the Resource Type dropdown list.

  4. Set the Source Project to ViewController.

  5. For each Oracle Composer enabled web page, select the Customize and Personalize action for each role for which you want to enable page customization.

  6. Select Task Flow from the Resource Type dropdown list.

  7. For each task flow that Oracle Composer can customize in your application, select the Customize and Personalize actions for each role for which you want to enable task flow customization.

    For more information, see the "Implementing Task Flow Security" section in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.

61.6 Restricting Customization for a Specific Component on a Page

Customization is enabled for all components on a page by default. However, there might be situations where you want to prevent customization for some of the components on a page.

61.6.1 How to Restrict Customization for a Specific Component on a Page

You can specify at the component level whether customizations for the component are permitted at runtime and who is permitted to customize that component.

How to restrict customization for a page component:

  1. In the Application Navigator, select the page or fragment for which you want to edit customization properties.

  2. In the Structure window, select the component for which you wish to restrict customization.

  3. If the Property Inspector is not open, choose Property Inspector from the View menu.

  4. In the Property Inspector, expand the Customization node.

  5. Set the appropriate customization attribute.

    • To disable customization of a component at runtime, set Customization Allowed to false.

    • To restrict customization to specific sets of users and layers, set Customization Allowed By to a space-separated list of the security roles for which you wish to permit customization.

For more information about these attributes, see the "Extended Metadata Properties" section in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

61.7 Configuring Runtime Resource String Editing for Customizations

The resource string editor enables runtime editing of strings. The changes made using the resource string editor are saved into an application override bundle, which can be translated and imported back into the application.

61.7.1 How to Configure Runtime Resource String Editing for Customizations

You must configure your application to enable runtime resource string editing of translated values for customizations.

To set up runtime resource string editing for customizations:

  1. In the Application Navigator in JDeveloper, right-click the application and select Application Properties.

  2. In the Application Properties dialog, select Resource Bundles.

  3. Click Add.

  4. In the File Name field in the Select Resource Bundle dialog, type oracle.adf.view.page.editor.resource.ComposerOverrideBundle.xlf, and click Open.

  5. Select the Overridden check box.

  6. Click OK to save your changes.

  7. Open the adf-config.xml file, which is located in the Application Resources > Descriptors > ADF META_INF folder.

  8. Add the resource-string-editor element shown in Example 61-2 to the page-editor-config section to enable resource string editing.

    Example 61-2 Configuration to Turn On Resource Picker

    <pe:page-editor-config>
      ...
      <resource-string-editor>
        <enabled>
          #{GlobalAreaBackingBean.tipLayerNonUser}
        </enabled>
      </resource-string-editor>
    </pe:page-editor-config>
    

This setting only enables resource string editing if the changes are customizations and not user personalizations, as user personalizations do not need to be translated.

For more information about configuring the runtime resource string editor, see the "Configuring Runtime Resource String Editing" section in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.

61.8 Enabling Pages for Runtime Customization

Pages can be customized at runtime using Oracle Composer.

61.8.1 How to Enable Pages for Runtime Customization

You must perform the following steps to enable runtime customization of a web page using Oracle Composer:

  1. Add the Oracle Composer technology scope to your project.

  2. Prepare your page for end-user personalizations.

  3. Ensure that the customizable pages have page definition files.

  4. Make pages runtime editable by adding Oracle Composer components to the pages.

  5. If you are enabling the runtime addition of content, set up a resource catalog.

  6. (Optional) Set up a default catalog definition file to facilitate testing.

  7. (Optional) Persist elements and properties across sessions outside of Oracle Composer.

61.8.1.1 Adding Oracle Composer Technology Scope to Your Project

You must add the Oracle Composer technology scope in order to access the technologies for consuming Oracle Composer components and enabling runtime customization.

To add Oracle Composer technology scope: 

  1. Right-click your view project and select Project Properties.

  2. Select Technology Scope.

  3. Add the Oracle Composer technology scope to your project and click OK.

61.8.1.2 Preparing Your Page for End-User Personalizations

You control whether an end user can personalize a page by setting the page's isPersonalizableInComposer property.

Note:

You must enable personalizations for all your dashboards. However, workareas should have personalizations enabled only if absolutely required.

To enable end-user personalizations: 

  1. In the Application Navigator, select the JSPX page.

  2. In the Structure pane, select the af:pageTemplate node.

  3. In the Property Inspector, select true from the isPersonalizableInComposer dropdown list.

61.8.1.3 Ensuring Customizable Pages Have Page Definitions

Page definition files define the binding objects that populate data the data in UI components at runtime. A page definition is required for runtime customizations that add additional components such as task flows and portlets. Page definition files can be found under Projects > View Controller > Application Sources > oracle.apps.view. If a required page definition file does not exist, complete the following steps to create one.

To create a page definition file for a JSPX page: 

  1. In the Application Navigator, right-click the JSPX page and choose Go to Page Definition.

  2. If the page does not have a page definition, a Confirm Create New Page Definition dialog appears. Click Yes to create the page.

61.8.1.4 Making a JSPX Document Editable at Runtime

To make a JSPX document editable at runtime, you add Oracle Composer components to the page at design time. You use the Panel Customizable component to define an area of the page onto which users can add components at runtime. You use the Layout Customizable component to enable users to lay out its child components in several predefined ways, such as two-column or three-column.

The Layout Customizable and Panel Customizable components are from the Oracle Composer technology scope, which you added when you completed the steps in Section 61.8.1.1, "Adding Oracle Composer Technology Scope to Your Project," and which are available from the Oracle Composer page in the Component Palette.

For more information about the Panel Customizable and Layout Customizable components, see the "Oracle Composer Components" section in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.

61.8.1.5 Setting Up a Resource Catalog

If you have a Panel Customizable component on your page to enable the runtime addition of content, you must set up a resource catalog to list the available content.

To learn how to create a custom resource catalog, see the "Creating and Managing Resource Catalogs" chapter in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.

61.8.1.6 Using the Default Catalog Definition File for Testing

A considerable amount of work is involved in setting up a resource catalog. If you want to test runtime customizations before you finish setting up your catalog, you can use the default catalog definition file.

To use the default catalog for testing: 

  1. Create the <application-root>/ViewController/src/oracle/adf/rc/metadata directory structure.

  2. Copy the Oracle WebCenter default catalog definition file default-catalog.xml to the newly created <application-root>/ViewController/src/oracle/adf/rc/metadata directory.

Caution:

The Oracle WebCenter default catalog should only be used for testing purposes. You must create your own catalog for production purposes.

61.8.1.7 Configuring the Persistence of Implicit Runtime Customizations

Certain ADF Faces components have attributes that can be saved during a user session. For example, whether the user left a panel box component expanded or collapsed. This type of change is referred to as implicit customization.

In Section 61.2, "Setting Project Properties to Enable User and Seeded Customizations," you configured the application to persist user customizations across sessions. This enables you to configure attributes to be saved across sessions. For information about how to configure the persistence of component attribute values, see the "Allowing User Customizations at Runtime" chapter in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

61.9 Enabling User Customization of the UI Shell Template

You can configure the UI Shell template so that it can be customizable out-of-the-box. This functionality enables customers to use Oracle Composer to customize UI Shell pages, as described in the "Customizing Existing Pages" chapter in the Oracle Fusion Applications Extensibility Guide.

61.9.1 How to Enable User Customization of the UI Shell Template

To enable users to customize the UI shell template, you add a link or button to the page fragment that launches the UI Shell template that allows the UI Shell template to be customized from Oracle Composer.

To add a link to a page fragment:

  1. From JDeveloper, open the page fragment (JSFF) from where the UI Shell can be edited.

  2. In the Application Navigator, expand the Data Controls hierarchy to locate and expand the FndUIShellController.

  3. Drag and drop the customizeUIShellTemplate operation onto the page, and choose Create > Method > ADF Button or choose Create > Method > ADF Link.

  4. In the Edit Action Binding dialog, provide a comma delimited list of fully packaged qualified customization classes for the custClass parameter, as shown in Example 61-3.

    Example 61-3 Sample custClass List

    oracle.apps.fnd.applcore.customization.GlobalCC,oracle.apps.fnd.applcore.customization.SiteCC
    

    Each of the customization classes supplied in the list must be valid and configured in the adf-config.xml file, as shown in Figure 61-3.

    Figure 61-3 adf-config.xml — Customization Classes

    adf-config.xml - Customization Classes

    If any of the classes cannot be instantiated, or if they are not pre-configured in the adf-config.xml file, an exception is thrown at runtime.

    The last customization class specified is the tip customization layer and the modifications to the UI Shell is written to this layer. In Example 61-3, the customization of the UI Shell takes place in SiteCC. The purpose of the earlier customization in the list is to view the UI Shell with any other customizations applied.

  5. Click OK.

  6. Open the page definition file for the page fragment.

  7. In the editor window, click the Source tab.

  8. Add the <methodAction> element shown in Example 61-4 to the <bindings> element. If you are enabling the customization of a UI Shell page other than TemplateCustomizationUIShell, change the viewID value to the view ID for that page.

    Example 61-4 custNavigate methodAction Binding

    <bindings>
        <methodAction id="custNavigate" RequiresUpdateModel="true"
                      Action="invokeMethod" MethodName="navigate"
                      IsViewObjectMethod="false" DataControl="FndUIShellController"
                      InstanceName="FndUIShellController.dataProvider"
                      ReturnName=
    "FndUIShellController.methodResults.navigate_FndUIShellController_dataProvider_navigate_result">
          <NamedData NDName="viewId" NDValue="TemplateCustomizationUIShell"
                     NDType="java.lang.String"/>
          <NamedData NDName="webApp" NDType="java.lang.String"/>
          <NamedData NDName="pageParametersList" NDType="java.lang.String"/>
          <NamedData NDName="navTaskFlowId" NDType="java.lang.String"/>
          <NamedData NDName="navTaskKeyList" NDType="java.lang.String"/>
          <NamedData NDName="navTaskParametersList" NDType="java.lang.String"/>
          <NamedData NDName="navTaskLabel" NDType="java.lang.String"/>
          <NamedData NDName="methodParameters"
      NDType="oracle.apps.fnd.applcore.patterns.uishell.ui.bean.FndMethodParameters"/>
        </methodAction>
      </bindings>
    
  9. If you are enabling the customization of a UI Shell page in another application, provide the values for the viewId, webApp, and pageParametersList, as shown in Example 61-5. For more information about these values, see Table 14-15.

    Example 61-5 Example of viewId, webApp, and pageParametersList Values

    <NamedData NDName="viewId" NDValue="specialUIShellPage"
                 NDType="java.lang.String"/>
      <NamedData NDName="webApp" NDValue="commonApp"
                 NDType="java.lang.String"/>
      <NamedData NDName="pageParametersList" NDValue="taskflow1"
                 NDType="java.lang.String"/>
    

61.10 Creating a Database Connection at the IDE Level

In addition to the application level connection to your application database, you might also need to create an IDE level connection.

The IDE level connection is required when implementing design-time customizations from JDeveloper, as described in the "Using JDeveloper for Customizations" chapter in the Oracle Fusion Applications Extensibility Guide.

61.10.1 How to Create a Database Connection at the IDE Level

You create the IDE level connection from the Database Navigator.

To create a database connection at the IDE level

  1. From the Database Navigator, right-click the ApplicationDB node under your application's node and choose Properties.

  2. Make a note of the settings and click Cancel.

  3. Right-click IDE Connections and choose New Connection.

  4. Enter the settings that you noted in Step 2.

  5. Click Test Connection to ensure the settings are correct.

  6. Click OK.

    The database connection appears under the IDE Connections node.

61.11 Implementing Design-Time Customizations from JDeveloper

While Oracle Composer enables user interface customizations, other customizations, such as changes to the model or task flow roles, must be done from JDeveloper. For information about implementing design-time customizations from JDeveloper, see the "Using JDeveloper for Customizations" chapter in the Oracle Fusion Applications Extensibility Guide.

61.12 Implementing Runtime Customizations

You can implement the following types of runtime customizations:

For information about building editable pages, see the "Allowing User Customizations at Runtime" chapter in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.

Note:

When you run your page in JDeveloper, all customizations created at runtime are, by default, written to a simulated MDS repository directory, which is stored at a temporary location in your system directory. The simulated MDS repository that is configured for the application reflects the metadata information that is contained in the Metadata Archive (MAR).

61.13 Customizing the Navigator Menu

The navigator menu is the global menu that displays in the UI Shell global area, and is displayed when you click Navigator buttons or links in the UI Shell, as shown in Figure 61-4.

Figure 61-4 Navigator Menu Example

Navigator menu example

A user with the required privileges can perform the following tasks to customize the menu at the Site level:

Note:

You cannot customize the Home menu or the Preferences menu.

For more information, see the "Customizing the Navigator Menu" chapter in the Oracle Fusion Applications Extensibility Guide.