Previous
Previous
 
Next
Next

Creating Page-Level Items

You can create page-level items by running the Create Item Wizard.

Topics:

About Item Naming Conventions

When specifying an item name, remember the following rules. Item names must:

As a best practice Oracle recommends including the page number when naming items. By default, wizards prefix page item names with P<page no>_ (for example, P1_NAME.

Creating a Page-Level Item on the Page Definition

You create a page-level item by running the Create Item Wizard from the Page Definition.

To create a page-level item:

  1. Navigate to the appropriate Page Definition. See "Accessing the Page Definition".

  2. If necessary, create an HTML region. See "Understanding Regions".

  3. To access the Create Item Wizard:

    • Tree view - Under Page Rending, right-click the region to contain the item and select Create Page Item.

    • Component view - Under Items, click the Create icon.

    The Create Item Wizard appears.

  4. Select an item type. See "About Item Types".

    When creating a Popup LOV, Color Picker, or Text Field with Calculator Popup, select Popup List of Values and then the specific popup list of values type.

  5. For Display Position and Name:

    1. Item Name - Enter a name used to retrieve the value of the item. See "About Item Naming Conventions".

    2. Sequence - Specify the sequence for this component. The sequence determines the order of evaluation.

    3. Region - Select a region to contain this item.

    4. Click Next.

  6. Follow the on-screen instructions.

  7. To learn more about a specific field, click the field label.

    When help is available, the item label changes to red when you pass your cursor over it, and the cursor changes to an arrow and question mark. See "About Field-Level Help".

Creating a Static List of Values

One way to create a static list of values is to edit an item's List of Values definition. Note that this type of list of values is not reusable. As a best practice, create a list of values as a shared component whenever possible.

To create a static list of values:

  1. Navigate to the appropriate Page Definition. See "Accessing the Page Definition".

  2. Access the attributes page for the item:

    • Tree view - Right-click on the item and select Edit.

    • Component view -Under Items, select the item name.

    The Edit Page Item page appears.

  3. Under Name, specify how the item will be rendered. From Display As, select Select List.

  4. Scroll down to List of Values.

  5. Under List of Values, create a static list of values:

    1. From Named LOV, select Select Named LOV.

    2. In List of values definition, enter a definition using the following syntax:

      STATIC[2]:Display Value[;Return Value],Display Value[;Return Value]
      

      Where:

      • The first keyword may be STATIC or STATIC2.

        STATIC results in the values being sorted alphabetically by display value. STATIC2 results in the values being displayed in the order they are entered in the list.

      • A semicolon separates the display value from the return value in each entry.

      • Return Value is optional. If a Return Value is not included, the return value is the same as the display value.

  6. To learn more, see item Help. To view help for a specific item on a page, click the item label.

    When help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

  7. Click Apply Changes.

    The examples that follow demonstrate syntax for three different static LOVs.

Example 1: Four Values Displayed in Alphabetical Order

In this example, the list of values has four values (Cow, Dog, Cat, and Lion) that display in alphabetical order. The return value of each entry equals the display value.

STATIC:Cow,Dog,Cat,Lion

Example 2: Ten Values Displayed in the Order Listed

In this example, the list of values has ten values that display in the order listed in the definition. The return value of each entry equals the display value.

STATIC2:10,15,20,25,50,100,200,500,1000,10000

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

In this example, the list of values has two values: Yes and No (the display value Yes and its return value Y, and the display value No and its return value N).

STATIC:Yes;Y,No;N

Creating a Cascading List of Values

By creating a cascading list of values (LOV), one item on a page determines the list of values for another item. Application Builder includes cascading LOV support for the following item types: Select List, Shuttle, Checkbox, Radio Group, Popup LOV, and List Manager. To learn more about item types, see About Item Types.

You create a cascading LOV by creating two items. To populate the second item, you specify a Cascading LOV Parent Item when running the Create Item Wizard or by editing the item's attributes.

The following example demonstrates how to create two related select lists where the value of the first list populates the second.

To a cascading list of values:

  1. Create the first item and name it P1_DEPTNO:

    1. Create a select list item. See "Creating a Page-Level Item on the Page Definition".

    2. For Item Type, select Select List.

    3. For Display Position and Name:

      • Item Name - Enter:

        P1_DEPTNO
        
      • Accept the remaining defaults and click Next.

    4. For Item Attributes:

      • Label - Enter Department

      • Accept the remaining defaults and click Next.

    5. For Settings, accept the defaults and click Next.

    6. For List of Values:

      • Display Null Value - Accept the default, Yes.

      • Null Display Value - Enter - Select Department -

        - Select Department -
        
      • In List of values definition, enter:

        SELECT dname as d,
               deptno as r
          FROM dept
         ORDER BY dname
        
      • Click Next.

    7. Accept the remaining defaults.

    8. Click Create Item.

  2. Create the second item named P1_EMPNO:

    1. Create a second item. See "Creating a Page-Level Item on the Page Definition".

    2. For Item Type, select Select List.

    3. For Display Position and Name:

      • Item Name - Enter:

        P1_EMPNO
        
      • Accept the remaining defaults and click Next.

    4. For Item Attributes:

      • Label - Enter Employee.

      • Accept the remaining defaults and click Next.

    5. For Settings, accept the defaults and click Next.

    6. For List of Values:

      • Display Null Value - Accept the default, Yes.

      • Null Display Value - Enter - Select Department -

        - Select Employee -
        
      • From Cascading LOV Parent Item(s) - Select P1_DEPTNO.

      • In List of values definition, enter:

        SELECT ename as d,
               empno as r
          FROM emp
         WHERE deptno = :P1_DEPTNO
         ORDER BY ename
        
      • Click Next.

    7. Accept the remaining defaults.

    8. Click Create Item.

Two select lists appear. Making a selection in the Department select list, determines which individuals display in the Employees select list.

Description of cascading_lov.gif follows
Description of the illustration cascading_lov.gif

Creating Multiple Items Using a Tabular Form

To create multiple items simultaneously:

  1. Navigate to the appropriate Page Definition. See "Accessing the Page Definition".

  2. If necessary, create an HTML region. See "Understanding Regions".

  3. To access the Create Item Wizard:

    • Tree view - Under Page Rending, right-click the region to contain the item and select Create Page Item.

    • Component view - Under Items, click the Create icon.

    The Create Item Wizard appears.

  4. Click the Create multiple items using tabular form link at the bottom of the page.

  5. On the Create Multiple Items page, specify the following:

    1. Create Item(s) in Region - Select the region to contain the items.

    2. Item Template - Select an item template.

    3. For each item, enter the Sequence, Name, Label, Type and specify whether the item should be cached.

  6. Click Create Multiple Items.

Creating Multiple Items Using Drag and Drop

To create multiple items using the Drag and Drop Layout page:

  1. Navigate to the appropriate Page Definition. See "Accessing the Page Definition".

  2. If necessary, create an HTML region. See "Understanding Regions".

  3. To access the Drag and Drop Layout page:

    • Tree view - Under Page Rending, right-click on the region and select Drag and Drop Layout.

    • Component view - Under Items, click the Drag and Drop Layout icon.

    The Drag and Drop Layout page appears.

  4. Select an item from the palette on the left side of the page and drag it to the appropriate position on the page.

  5. Edit the item attributes at the of the page.

    1. Item Name - Enter a name used to retrieve the value of the item. See "About Item Naming Conventions".

    2. Label - Enter the label for this item. You may include HTML, JavaScript, and shortcuts. You can also use the substitution string #CURRENT_ITEM_NAME# to obtain the name of the item associated with this label.

    3. Display Type - Select a display type (if applicable). See "About Item Types".

  6. To edit an existing item, select the item and then edit the Item Name and Label fields, or select a new Display Type at the top of the page.

  7. Click Next.

  8. Optionally, edit the each item's Name and Label.

  9. Click Apply Changes.