22 APEX_REGION

The APEX_REGION package is the public API for handling regions.

IS_READ_ONLY Function

This function returns TRUE if the current region is rendered read-only and FALSE if region is not rendered read-only. If the function is called from a context where no region is currently processed, it returns NULL. For example, you can use this function in conditions of a region or its underlying items and buttons.

Syntax

FUNCTION IS_READ_ONLY 
RETURN BOOLEAN;
    

Parameters

None.

Example

This examples purges the session for a specific region cache for the whole application.

RETURN APEX_REGION.IS_READ_ONLY;

PURGE_CACHE Procedure

This procedure purges the region cache of the specified application, page, and region.

Syntax

PROCEDURE PURGE_CACHE (
    p_application_id       IN NUMBER DEFAULT wwv_flow.g_flow_id,
    p_page_id              IN NUMBER DEFAULT NULL,
    p_region_id            IN NUMBER DEFAULT NULL,
    p_current_session_only IN BOOLEAN DEFAULT FALSE );

Parameters

Table 22-1 PURGE_CACHE Parameters

Parameter Description

p_application_id

ID of the application where the region caches should be purged. Defaults to the current application.

p_page_id

ID of the page where the region caches should be purged. If no value is specified (which is the default), all regions of the application are purged.

p_region_id

ID of a specific region on a page. If no value is specified, all regions of the specified page are purged.

p_current_session_only

Specify true if you only want to purge entries that where saved for the current session. defaults to false.


Example

This example purges session specific region cache for the whole application.

BEGIN
     APEX_REGION.PURGE_CACHE (
         p_current_session_only => true );
END;