Skip Headers
Oracle® Application Express Application Builder User's Guide
Release 4.0

Part Number E15517-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF · Mobipocket

A About Item Types

When you create an item, you specify an item type. Once you create an item, these types appear on the Display As list on the Edit Page Item page. Table A-1, "Available Item Types" describes available item types.

See Also:

"Understanding Page-Level Items"

Controlling Item Functionality by Editing Item Attributes

You can control how a page item works by editing the page item's attributes. Each item type in Table A-1, "Available Item Types" lists important attributes that control item functionality. To learn more about editing attributes, see "Editing Page-Level Items"

Available Item Types

When you create an item, you specify an item type. Once you create an item, these types appear on the Display As list on the Edit Page Item page. This section describes available item types and important item attributes that control item behavior.

Table A-1 Available Item Types

Item Type Description

Check Box

Displayed using a list of values. A list of values is required for items displayed as check boxes. The value corresponding to a checked box is returned in a single colon-delimited string.

The following example demonstrates how to create a single check box that returns YES. This example would display both a check box and a field label.

SELECT NULL display_text, 'YES' return_value FROM DUAL;

This example includes the additional text Click to select.

SELECT 'Click to select' display_text, 'YES' return_value FROM DUAL;

See Also: "APEX_UTIL" in Oracle Application Express API Reference for information about breaking up returned values

Settings attributes:

  • Value Required - If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Number of Checkbox Columns - Defines the number of layout columns to use to display the values defined in the List of Values.

See Also: "Creating a Cascading List of Values"

Color Picker

Renders as a text field with an icon. When the user clicks the icon, a popup window appears. When the user makes a selection from the palette, the HTML value for the color selected (for example, #000000 for black) is returned.

Note: When creating a new item of this type, first select Popup List of Values and then Color Picker.

Settings attributes:

  • Value Required - If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

Date Picker

Displays a text field with a Calendar icon next to it. When clicked, this icon displays a small calendar where the user can select a date and a time (optional).

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted.

  • Format Mask - Identify the date format mask used by the item type. You can use substitution syntax to reference a dynamic format mask from an application or page item.

  • Highlighted Date - Enter a date, which should be highlighted in the Date picker. See item Help for more details.

  • Minimum Date - Enter a minimum selectable date.

  • Maximum Date - Enter the maximum selectable date.

  • Show - Determines when the date picker displays.

  • Show other Months - Display dates in other months (non-selectable) at the start or end of the current month.

  • Navigation List - Change the month, year or both using a select list.

Date Picker (Classic)

Displays a text field with a Calendar icon next to it. When clicked, this icon displays a small calendar where the user can select a date and a time (optional).

If the format you need is not included in the Display As list, select Date Picker (use application format mask) or Date Picker (use item format mask). The latter uses the value from the Format Mask field in the Source section of the Edit Page Item page.

Display Image

Enables the display of images stored in an image URL stored in another page item or in a BLOB column. To alter where the image is stored, edit the item and configure the Based on attribute. Options include:

Settings attributes:

  • Based On - Determines where the item is retrieved from. To learn more, see item Help.

  • Alternative Text Column - If specified, the returned text is used as an alternative text for the image.

  • Filename Column - If specified, the returned filename is used by the browser in the Save As dialog when the user tries to saves the image.

  • BLOB Last Updated Column - If specified, the column is used for browser caching. It identifies if the image changed since the last browser request. If not entered, no caching is done. Note: This attribute is case sensitive and the column must be of type DATE.

Display Only

Displays the item as display only text.

Settings attributes:

  • Save Session State - Stores the current value in session state when the page gets submitted.

  • Based On - Specifies what gets displayed in the field. Options include:

    Page Item Value - The current value of the page item displays.

    Display Value of List of Values - The current value of the page item maps to a different display value using a list of values.

    Output of PL/SQL Code - The specified PL/SQL code takes care of emitting the necessary output for the page item.

  • Show Line Breaks - Select Yes to convert line breaks in the display value to a HTML line break and display them in HTML output.

File Browse

Displays a text field with a Browse... button. The Browse button enables the user to locate and upload a file from a local file system.

See Also: "Securing File Uploads"

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted.

  • Storage Type - Identify where the uploaded file is stored.

  • MIME Type Column - Specify the name of the column where the MIME type of the uploaded file should be stored.

  • Filename Column - Specify the name of the column where the filename of the uploaded file should be stored.

  • Character Set Column - Specify the name of the column where the character set of the uploaded file should be stored.

  • BLOB Last Updated Column - Specify the name of the column to update with the current time stamp when a file is uploaded.

  • Display Download Link - Select Yes to display the download link next to the Browse button.

  • Download Link Text - Text used for the download link.

  • Content Disposition - Determines if the downloaded content is displayed inline within the Browser window or if a Open dialog displays.

Hidden

Creates a hidden page item.

Settings attributes:

  • Value is Protected - Select Yes to prevent hidden values from being manipulated when a page is posted.

List Manager

Based on a list of values. This item enables you to manage a list of items by selecting and adding to a list. The list of values display as a popup.

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted.

  • Fetch - Specifies if data is displayed when the Popup LOV is opened by a user.

See Also: "Creating a Cascading List of Values"

Number Field

Displays a number field. You can configure number range checks for values entered by configuring the Minimum Value and Maximum Value attributes. This item type will automatically checks if the entered value is a number. No extra validations are required.

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted.

  • Format Mask - Identify the number format mask used by the item type. You can use substitution syntax to reference a dynamic format mask from an application or page item.

  • Minimum Value - Enter a minimum enterable value.

  • Maximum Value - Enter the maximum enterable value.

  • Number Alignment - Select the value alignment within the field.

Password

Renders as an HTML password form element.

Settings attributes:

  • Value Required - If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Submit when Enter Pressed - Select Yes to submit the page when ENTER is pressed. This saves the password in a database table when the page is submitted. Select No to not save the password in a database table.

    Only select Yes when the password is needed in session state for use by other pages during the session.

  • Does not save state - Select Yes to suppress text entered into the field and not save the value in session state.

    For security reasons you should always set this attribute to Yes.

If you must reference and retrieve the value of a password in your application then you set the Store value encrypted in session state attribute to Yes. To learn more, see "About Session State and Security".

Popup List of Values (LOV)

Renders as a text field with an icon. When the user clicks the icon, a popup window appears with a list of values represented as a series of links. When the user makes a selection from the list, the selected value is placed in the text field.

You control popup lists of values through templates. You can only specify one popup list of values (LOV) template for each application. A popup LOV is a good choice for lists of values that are too large to return on a single page.

Popup LOVs must be based on a query that selects two columns with different column aliases. For example:

SELECT ename name, empno id 
   FROM emp

If one of the columns is an expression, remember to use an alias. For example:

SELECT ename||' '||job display_value, empno FROM emp

Note: When creating a new item of this type, first select Popup List of Values and then Text Field with Calculator Popup.

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Input Field - Specifies what the input field of the Popup LOV shows and how it will behave.

  • Fetch - Specifies if data is displayed when the Popup LOV is opened by an user.

    Note: Input Field and Fetch are not available for Text Field with Calculator Popup.

See Also: "Creating a Cascading List of Values"

Radio Group

Renders as an HTML radio group form element, based on a list of values.

The following example displays employee names (ename), but returns employee numbers (empno):

SELECT ename, empno FROM emp

Settings and other attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Number of Radio Columns - Defines the number of columns to use to display the values defined in the List of Values.

  • Page Action when Value Changed - Option includes: None (Default); Submit Page; or Redirect and Set Value.

    Choose Submit Page to have the page submitted when the radio button is selected.

  • Execute Validations - Displays if Page Action when Value Changed is set to Submit Page. Controls the execution of validations when a page is submitted. Set this attribute to No to prevent the execution of validations and associated error messages. Set this attribute to Yes to execute all page and built-in validations and associated error messages when the page is submitted. Use this attribute in conjunction with the validation attribute, Always Execute. To learn more, see "Creating a Validation".

See Also: "Creating a Cascading List of Values"

Rich Text Editor

Renders as an HTML text area. There is no maximum length for an item displayed as a text area. You control the height and width by editing the Height and Width item attribute.

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Editor - Select an editor.

  • Toolbar - Select a toolbar style.

  • Toolbar Expanded - Determines if the toolbar must start expanded when the Rich Text Editor is loaded.

  • Skin - Skin used for the appearance of the Rich Text Editor.

Select List

Displays using a list of values. A list of values is required for items displayed as a select list. Select lists are rendered using the HTML form element <select>. The values in a select list are determined using a named list of values or a list of values defined at the item level. You can specify the NULL display value and NULL return value.

The following example would return employee names (ename) and employee numbers (empno) from the emp table. Note that column aliases are not required and are included in this example for clarity.

SELECT ename display_text, empno return_value FROM emp

Settings and other attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Page Action when Value Changed - Options include: None, Submit Page, Redirect and Set Value, Redirect to Page (based on selected value), or Redirect to URL (based on selected value).

  • Allow Multi Selection - Enables to select multiple values in the Select List. Use the Height attribute to define how many entries of the Select List should be visible at once.

  • Execute Validations - Displays if Page Action when Value Changed is set to Submit Page. Controls the execution of validations when a page is submitted. Set this attribute to No to prevent the execution of validations and associated error messages. Set this attribute to Yes to execute all page and built-in validations and associated error messages when the page is submitted. Use this attribute in conjunction with the validation attribute, Always Execute. To learn more, see "Creating a Validation".

See Also: "Creating a Cascading List of Values"

Shuttle

Renders as a multiple select list that includes two boxes containing lists. The left list displays a source list of values. Users use the shuttle control icons and buttons to select list items and move them from the left (source) list to the right (destination) list. Each shuttle has five controls:

  • Move all - Moves all items in the source list to the destination list.

  • Move selected - Moves only selected items (Ctrl + Shift items) to destination list.

  • Remove selected - Moves only selected items (Ctrl + Shift items) to the source list.

  • Remove all - Moves all items on destination list back to the source list.

  • Refresh - Resets the source and destination lists.

The right destination list includes the sort controls Move to top, Move up, Move down, and Move to bottom.

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Show Controls - Specifies which controls are visible for the Shuttle. Options include: None, Moving Only, Ordering Only, or All.

Note: In order to create this item type, you must define a list of values. See "Creating Lists of Values at the Application Level", "Working with Multiple Select List Item", and "Creating a Cascading List of Values"

Stop and Start HTML Layout Table

Forces the close of an HTML table using the </table> tag and starts a HTML table. You can use this item type to reset the column width in the middle of the region.

Note that a Stop and Start Table item only displays its label. You can prevent the label from displaying at all by setting it to null. To do this, you simply remove the default label.

Text Area

Renders as an HTML text area. There is no maximum length for an item displayed as a text area. You control the height and width by editing the Height, Width, and Maximum Width attributes.

Settings attributes:

  • Value Required- If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted.

    By defining a message called APEX.PAGE_ITEM_IS_REQUIRED in Shared Components, Text Messages, the predefined error text can be replaced by an application specific error text. The display location of the message is defined by the application level setting Default error display location.

  • Resizable - Select Yes to enable the user resize the Text Area with a mouse.

  • Auto-Height - Select Yes to scale the text area to the amount of data. This option varies the height based on the amount of text.

  • Character Counter - Select Yes to include a counter that displays the number of characters entered in the field.

Text Field with Calculator Popup

Renders as a text field with an icon. When clicked, the icon displays a small window containing a calculator. Calculations are placed back in the text field.

Note: When creating a new item of this type, first select Popup List of Values and then Text Field with Calculator Popup.

Settings attributes:

  • Value Required - If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

Text Field with Auto Complete

Displays a list of possible values when the user starts typing in the field. The values are based on the defined LOV SQL statement. The following example displays employee names (ename) and stores them in the field:

SELECT ename FROM emp
ORDER BY 1

Settings attributes:

  • Value Required - If select Yes and the page item is visible, Oracle Application Express automatically performs a NOT NULL validation when the page is submitted. See item Help for more details.

  • Search - Defines how the search with the entered value should be performed. Contains & Ignore Case prevents the use of an existing index on the column if Lazy Loading is set to Yes.

  • Lazy Loading - If select Yes, the matching values are read from the database each time the user types a character. Select Yes if the LOV SQL statement returns many records. Otherwise all values are included if the page is rendered, independent of whether or not the autocomplete is used. If select No, all values are read only once when the page is rendered.

  • Maximum Values in List - Specify the number of items in the select box to avoid performance problems by returning to many rows.

  • Automatic Fill - Select Yes to fill the text field while still selecting a value, replacing the value if something is typed, or something else is selected.

  • Select First - Select Yes and the first autocomplete value will be automatically selected when the user presses TAB or RETURN.

  • Highlight Search - Select Yes and the entered value is highlighted in the select box of matching entries.