13.1.3.3 Creating a Static List of Values

Create a static list of values locally with the definition of the item.

Note that local a list of values is not reusable. As a best practice, Oracle recommends creating a list of values as a shared component whenever possible.

To create a static list of values locally:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Create a new item from the Rendering tab or by adding it from the Gallery.

    The Property Editor displays the Page Item attributes. Attributes are organized in groups. To search for a group or an attribute, enter a keyword in the Filter Properties field. The Property Editor displays the group or attributes. Or, you can click Go to Group and select the group.

  3. Edit the appropriate attributes in the Property Editor.

    To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.

  4. Under Identification:
    1. Identification, Name - Enter the name of this item. Item names must be valid Oracle identifiers. Oracle recommends that item names be no longer then 30 bytes so they can be used as bind variables in SQL Queries.
    2. Identification, Type - Select Select List.
  5. Under List of Values:
    1. List of Values, Type - Select Static Values.
    2. List of Values, Static Values - Click the Display1, Display2 button.
      In the Static Values dialog:
      • Display Value - Enter the Display Value for each entry.
      • Return Value - Enter the Return Value for each entry. If you do not include a Return Value, the return value equals the Display Value
      • Move Up and Move Down - Click the Move Up and Move Down arrow buttons to change the order.
      • Sort - To sort the list at alphabetically at runtime, expand the Sort region and enable Sort at Runtime.

      Tip:

      See the sections that follow to view examples.

    3. Click OK.
  6. Edit the remaining List of Values attributes as appropriate. To learn more about an attribute, select the attribute and click the Help tab in the central pane.
  7. To save your changes click Save. To save and run the page, click Save and Run Page.

Example 13-1 Four Values Displayed in Alphabetical Order

This example shows the Static Values dialog with four values defined: Lion, Dog, Cow, and Cat. The return value of each entry is capitalized. Sort at Runtime is set to On so that the list displays alphabetical order.

Description of static_four_values.png follows
Description of the illustration static_four_values.png

In a running application this select list would look similar to the following illustration.

Description of static_4_values_run.png follows
Description of the illustration static_4_values_run.png

Example 13-2 Values Displayed in the Order Listed

This example shows the Static Values dialog with ten values defined: 10, 15, 20, 25, 50, 100, 200, 500, 1000, and 10000 which display in the order listed. The return value of each entry equals the display value.

Description of static_10_values.png follows
Description of the illustration static_10_values.png

In a running application this select list would look similar to the following illustration.

Description of static_10_values_run.png follows
Description of the illustration static_10_values_run.png

Example 13-3 A List of Values with Having Both a Return and Display Value

This example shows the Static Values dialog with two values defined. The first value has a Display Value of Yes and a Return Value of Y. The second value has a Display Value of No and a Return Value of N Sort at Runtime is set to Off to make sure Yes always displays first.

Description of static_display_return.png follows
Description of the illustration static_display_return.png

In a running application this select list would look similar to the following illustration.

Description of static_display_return_run.png follows
Description of the illustration static_display_return_run.png