59.7 SET_SESSION_STYLE Procedure

This procedure sets the theme style dynamically for the current session. This is typically called after successful authentication. Specify the theme style Static ID.

Note:

If APEX cannot find a matching theme style by Static ID, it checks for a matching theme style by name. This is done for backward compatibility.

Syntax

APEX_THEME.SET_SESSION_STYLE (
    p_application_id  IN apex_application.g_flow_id,
    p_theme_number    IN apex_themes.theme_id,
    p_name            IN VARCHAR2 ); 

Parameters

Parameter Description
p_application_id The application ID. Default is the current application.
p_theme_number The theme number to set the session style for. Default is the current theme of the application.
p_name The theme style Static ID to be used in the session.

Example

The following example gets the current theme number from Oracle APEX Dictionary View and sets the session theme style for the current theme to Vita.

DECLARE
    l_theme_number number;
BEGIN
    SELECT theme_number
      INTO l_theme_number
      FROM apex_application_themes
    WHERE application_id = :APP_ID;
    apex_theme.set_session_style (
        p_theme_number => l_theme_number,
        p_name         => 'Vita' );
END;