Creating a New UI Control Template

You must create a new UI control template to customize the display of an item. You do this by copying an existing template. Then you insert a UI property name variable into the copy. Finally, you assign the new template as the UI control template for the item.

To insert a UI property variable into a Web template, you must locate the od-type="control" element that governs the display of the item. The UI control Web templates all have the same basic layout:

  • An od-include statement reads in a header file. This file places the relationship name at the start of the form that will contain the items.

  • An od:iterator loop iterates through the relationship in the customizable product and loads its items into an array.

  • A second od-iterator loop reads the array and constructs the form.

  • A variable called DisplayValue near the beginning of the second od-iterator loop defines what item name appears next to each instance of the control in the form.

  • The DisplayValue variable is set equal to an od-type="control" element that contains an attribute CfgFieldName= "CxObjName". Replace CxObjName with the name of the UI property variable. The name must be preceded with a period (.). For example: ".NewName".

To create a new UI control template

  1. Navigate to the Administration - Product screen, then the Product Definitions view.

  2. In the Products list, select and lock the desired product.

  3. In the Structure menu, select User Interface.

  4. Click the magnifying icon.

    The Pick User Interface Style dialog opens.

  5. In the Pick User Interface Style dialog, locate the required UI control template.

    Make a note of this template name, it is required in Step 7.

  6. In Oracle Web Tools, create a new workspace.

  7. Open the Web Templates view, and query for the UI control template name from Step 5.

  8. Copy this template, and rename it.

  9. From the Type menu, assign the required template type to your Web template.

  10. Click the new Web template and make the following modifications:

    • Locate the od-type="control" element containing the CfgFieldName= "CxObjName" attribute.

    • Replace "CxObjName" with a UI property variable name and save the file.

    • Click Add and add the new template. Then, select it as the base theme template.

    • The variable name must begin with a period (.). For example: ".NewName". Verify the variable name is enclosed in quotes.