18 Customizing MAF AMX Application Feature Artifacts

This chapter describes how to preform customization of existing MAF AMX pages, task flows, and page definition files.

This chapter includes the following sections:

18.1 Introduction to Customizing MAF AMX Pages and Artifacts

You can use the standard customization mechanism provided by JDeveloper and Oracle Metadata Service (MDS) to customize your existing MAF AMX application feature artifacts and metadata files, including the following:

  • MAF AMX files (.amx)

  • Task flow files, such as ViewController-task-flow.xml

  • Page definition files (<page name>.PageDef.xml)

  • Data control XML file—a package file that contains a data control structure file (that is, a package file named for a data control and prepended with persdef.).

The customization changes that you make at design time are applied to your files during deployment and become visible at runtime. MAF AMX supports the static seeded customization, where the final version for a specific customization context is seeded during deployment and work statically at runtime for that customization context. For each customization context you have to deploy a separate MAF application.

Note:

MAF AMX does not support the user customization that both creates and applies customization at runtime.

For information about customizing the MAF application-level artifacts, see Chapter 10, "Customizing MAF Application Artifacts with MDS."

18.2 Customizing MAF AMX Pages and Artifacts

You customize your MAF AMX pages and artifacts by following steps outlined in Section 10.1, "Introduction to Applying MDS Customizations to MAF Files."

When configuring customization layers, to help ensure the uniqueness of the identifier so that customizations are applied accurately, you can add an id-prefix token. When you add a new element, such as, for example, a commandButton to a MAF AMX page during customization, JDeveloper adds the id-prefix of the layer and layer value to the autogenerated identifier for the element to create an id for the newly added element in the customization metadata file. As shown in the following example, the site layer has an id-prefix of " s " and the headquarters layer value has an id-prefix of " hq ".

<cust-layers  xmlns="http://xmlns.oracle.com/mds/dt">
   <cust-layer name="industry" id-prefix="i">
      <cust-layer-value value="financial"
                        display-name="Financial"
                        id-prefix="f"/>
      <cust-layer-value value="healthcare"
                        display-name="Healthcare"
                        id-prefix="h"/>
   </cust-layer>
   <cust-layer name="site" id-prefix="s">
      <cust-layer-value value="headquarters"
                        display-name="HQ"
                        id-prefix="hq"/>
      <cust-layer-value value="remoteoffices"
                        display-name="Remote"
                        id-prefix="rm"/>
   </cust-layer>
</cust-layers>

When you select site/headquarters as the tip layer and add a MAF AMX Button component to a page, the commandButton element will have an id of " shqcb1 " in the metadata customization file.

When the customization process is complete, JDeveloper creates a metadata file for the customizations and a subpackage for storing them. The metadata file contains the customizations for the customized object, which are applied over the base metadata at runtime. JDeveloper gives the new metadata file the same name as the base file for the object, but includes an additional .xml extension, as Figure 18-1, Figure 18-2, Figure 18-3, and Figure 18-4 show.

Figure 18-1 Customization File for MAF AMX Page

Customization file for a MAF AMX page

Figure 18-2 Customization File for Task Flow

Customization file for a task flow file

Figure 18-3 Customization File for Page Definition

Customization file for a page definition file

Figure 18-4 Customization File for Data Control XML File

Customization file for a data control XML file