45.50 PRINT_READ_ONLY Procedure Signature 2

This procedure outputs a read-only text field or textarea. Use when displaying multiple values.

Syntax

APEX_PLUGIN_UTIL.PRINT_READ_ONLY (
    p_item              IN apex_plugin_api.t_item,
    p_param             IN apex_plugin_api.t_item_render_param,
    p_value             IN apex_session_state_api.t_value
                                   DEFAULT apex_session_state_api.t_value(),
    p_display_values    IN apex_global.vc_arr2,
    p_width             IN PLS_INTEGER                        DEFAULT NULL,
    p_height            IN PLS_INTEGER                        DEFAULT NULL,
    p_css_classes       IN VARCHAR2                           DEFAULT NULL,
    p_protected         IN BOOLEAN                            DEFAULT TRUE,
    p_escape            IN BOOLEAN                            DEFAULT TRUE )

Parameters

Parameter Description
p_item The item's p_item variable.
p_param The item's p_param variable.
p_value (Optional) The unescaped value (API always escapes it). If NULL, defaults to p_param.session_state_value.
p_display_values Array of display values.
p_width (Optional) The width of the item. If NULL, uses p_item.element_width.
p_height (Optional) The height of the item. If NULL, uses p_item.element_height. If height is greater than 1, API renders a textarea instead of a text field.
p_css_classes (Optional) Additional CSS classes to be added to the text field or textarea.
p_protected Add checksum for the value. Default TRUE.
p_escape Controls escaping of p_display_values (p_value is always escaped). Default TRUE.

Example

procedure render_custom_item (
    p_item   in            apex_plugin.t_item,
    p_plugin in            apex_plugin.t_plugin,
    p_param  in            apex_plugin.t_item_render_param,
    p_result in out nocopy apex_plugin.t_item_render_result )
IS
    l_search_list apex_application_global.vc_arr2;
    l_result_list apex_application_global.vc_arr2;
BEGIN
    l_search_list(1) := '7863';
    l_search_list(2) := '7911';
    l_search_list(3) := '7988';
    l_result_list := apex_plugin_util.get_display_data (
                         p_sql_statement        => p_item.lov_definition,
                         p_min_columns          => 2,
                         p_max_columns          => 2,
                         p_component_name       => p_item.name,
                         p_search_col_no        => 1,
                         p_search_value_list    => l_search_list );
    apex_plugin_util.print_read_only (
        p_item                  => p_item,
        p_param                 => p_param,
        p_display_values        => l_result_list,
        p_css_classes           => 'my-readonly-custom-item' );
END render_custom_item;