An item is part of an HTML form. An item can be a text field, text area, password, select list, check box, and so on. This section describes how to create page-level items in Page Designer.
Item attributes affect the display of items on a page. For example, these attributes can impact where a label displays, how large an item is, and if the item displays next to or below the previous item.
To view page-level attributes inPage Designer:
View the page containing item in Page Designer. See "Viewing a Page in Page Designer."
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Edit the appropriate attributes in the Property Editor.
Tip:
To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Click Save.
Click Save and Run to view the page. You shuttle item should look similar to the following illustration.
This section describes how to create page-level items by running the Create Item Wizard.
To create a page-level item from the Rendering tree:
View the page to contain the item in Page Designer. See "Viewing a Page in Page Designer."
If necessary, create a region to contain the item. See "About Regions."
In the Rendering tree, right-click the region to contain the item and select Create Page Item.
The Property Editor - Page Items appears.
The Messages tab displays a red or yellow badge to identify messages you need to address. Selecting a message displays the associated attribute in the Property Editor. You must address red error message before you can save.
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Edit the appropriate attributes in the Property Editor.
Tip:
To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Click Save.
To create a page-level item by adding if from the Gallery:
View the page to contain the item in Page Designer. See "Viewing a Page in Page Designer."
If necessary, create a region to contain the item. See "About Regions."
In the Gallery, click the Items tab.
Passing the cursor over an item displays a tooltip that describes it.
Select an item and drag it to the appropriate location in Grid Layout.
Tip:
You also right-click the item, click Add To, and select the appropriate location.The Property Editor - Page Items appears.
The Messages tab displays a red or yellow badge to identify messages you need to address. Selecting a message displays the associated attribute in the Property Editor. You must address red error message before you can save.
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Edit the appropriate attributes in the Property Editor.
Tip:
To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Click Save.
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:
View the page in Page Designer. See "Viewing a Page in Page Designer."
Create a new item. See "Creating a Page-Level Item from the Rendering Tree" and "Adding a Page-Level Item from the Gallery."
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Edit the appropriate attributes in the Property Editor.
Tip:
To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Under Identification:
Name - Enter a name. See "About Item Naming Conventions."
Type - Select Select List.
Under List of Values:
Type - Select Static Values.
Static Values - Enter the text for this static list of values using the following syntax:
STATIC[2]:Display Value[;Return Value],Display Value[;Return Value]
Where:
The first keyword may be STATIC
or STATIC2
.
If the text starts with STATIC:
, the list values displays alphabetically. Alternatively, if the text starts with STATIC2:
, the list values displays in the same order they are specified in the text.
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 equals the display value.
Click Save.
Click Save and Run to view the page.
The examples that follow demonstrate syntax for three different static LOVs.
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
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.
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 create a cascading list of values:
Create the first item and name it P1_DEPTNO:
Create a select list item.
For Identification, Type, select Select List.
For Identification:
Name - Enter:
P1_DEPTNO
Type - Select Select List.
For Label:
Label - Enter:
Department
For List of Values:
Type - Select SQL Query.
For SQL Query, enter:
SELECT dname as d, deptno as r FROM dept ORDER BY dname
Display Null Value - Select Yes.
Null Display Value - Enter - Select:
- Select Department -
Accept the remaining defaults.
Click Save.
Create the second item named P1_EMPNO
:
Create a select list item.
For Identification, Type, select Select List.
For Identification:
Name - Enter:
P1_EMPNO
Type - Select Select List.
For Label:
Label - Enter:
Employee
For List of Values:
Type - Select SQL Query.
For SQL Query, enter:
SELECT ename as d, empno as r FROM emp WHERE deptno = :P1_DEPTNO ORDER BY ename
Display Null Value - Select Yes.
Null Display Value - Enter - Select:
- Select Employee -
Accept the remaining defaults.
Click Save.
Two select lists appear. Making a selection in the Department select list, determines which individuals display in the Employees select list.
This section describes how to edit page-level items in Page Designer.
To edit item attributes in the Property Editor:
View the page in Page Designer. See "Viewing Page-Level Items in Page Designer."
Page Designer appears.
In either the Rendering tree or Grid Layout, select the item to edit.
The Property Editor changes to display Property Editor - Page Item.
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Edit the appropriate attributes.
To learn more about a specific attribute on a page, click the attribute label. See "Viewing Field-Level Help."
You define default values for an item using the attributes under Default on the Edit Page Item page. The default value is used when the item's value is not derived from session state and when the source value is NULL
.
To define a default value for an item:
View the item attributes in the Property Editor. See "Editing Page Item Attributes in the Property Editor."
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Locate and expand Default.
Under Default:
Select a Default Type:
Static Value
PL/SQL Expression
PL/SQL Function Body
In the field provided, enter a value or code as appropriate.
Tip:
To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Click Save.
To configure page item security:
View the item attributes in the Property Editor. See "Editing Page Item Attributes in the Property Editor."
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Locate and expand Security.
Configure the Security attributes described in Table 15-2.
Table 15-2 Property Editor - Page Item, Security
Attribute | Description |
---|---|
Select an authorization scheme which must evaluate to TRUE in order for this component to be rendered or otherwise processed. |
|
Select a Session State Protection level. Options include:
If Session State Protection is enabled, these additional attributes may be applied to items:
See Also: "Understanding Session State Protection" |
|
Specify whether to encrypt this item when stored in session state. If the contents of an item contain sensitive data, then you should encrypt the value when it is stored in the Application Express session state management tables. Otherwise, anyone with rights to read the Application Express meta data tables could potentially write a query to extract this sensitive data. Values up to 4000 bytes in length can be encrypted. Attempts to encrypt values longer than 4000 bytes produce an error message. |
|
This attribute only displays with some item types. Select Yes to prevent Cross-Site Scripting (XSS) attacks. Select No if you want that HTML tags which are stored in the page item or in the entries of a list of value are actually rendered. |
|
Use this attribute to restrict the characters that can be saved in session state. Oracle Application Express displays an error message if a user tries to save data which does not conform to the selected character restriction. Available options include:
|
If the item type supports quick pick selection, use the Quick Picks attributes to define up to ten selections that display under a give item. Clicking on a quick pick sets the value of item. The following example shows quick picks for 5%, 10%, 15%, and 20%.
To create a quick pick:
View the item attributes in the Property Editor. See "Editing Page Item Attributes in the Property Editor."
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Tip:
TTo learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Under Quick Picks:
Show Quick Picks - Select Yes.
Link Attributes - Enter HTML attributes that are associated with the display of each Quick Pick link.
Label X - Enter the label for the each Quick Pick. This label is the text the end user of the application sees.
Value X - Enter the value associated with each Quick Pick. This value replaces the existing item value when the user clicks the quick pick.
Click Save.
To display a conditional item:
View the item attributes in the Property Editor. See "Editing Page Item Attributes in the Property Editor."
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Tip:
To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Expand Condition. Select a condition type and enter appropriate information in the field provided.
Click Save.
To display a read-only item:
View the item attributes in the Property Editor. See "Editing Page Item Attributes in the Property Editor."
View all attributes in the Property Editor. Select Show All from the Property Editor Menu.
Tip:
To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the center pane.Edit the appropriate attributes in the Property Editor.
Expand Read Only. Select a Read Only type and enter appropriate information in the field provided.
Click Save.