44.113 SET_CURRENT_THEME_STYLE Procedure [DEPRECATED]

This procedure sets the user interface theme style for an application. For example, if there are more than one theme styles available for the current theme, you can use this procedure to change the application theme style.

Syntax

APEX_UTIL.SET_CURRENT_THEME_STYLE(
    p_theme_number IN NUMBER,
    p_theme_style_id IN NUMBER
    );

Parameters

Table 44-96 SET_CURRENT_THEME_STYLE Parameters

Parameter Description

p_theme_number

The current theme number of the application. This can be retrieved from APEX_APPLICATION_THEMES view.

p_theme_style_id

The numeric ID of theme style. You can get available theme styles for an application from APEX_APPLICATION_THEME_STYLES view.

Example

The following example shows how to use the SET_CURRENT_THEME_STYLE procedure to set the current application desktop theme style to Blue.

DECLARE
    l_current_theme_number number;
    l_theme_style_id       number;

BEGIN
    select theme_number 
    into l_current_theme_number 
    from apex_application_themes 
    where application_id = :app_id 
    and ui_type_name   = 'DESKTOP' 
    and is_current = 'Yes';  
 
    select s.theme_style_id 
    into l_new_theme_style_id 
    from apex_application_theme_styles s, apex_application_themes t 
    where s.application_id = t.application_id 
    and s.theme_number = t.theme_number 
    and s.application_id = :app_id 
    and t.ui_type_name   = 'DESKTOP' 
    and t.is_current = 'Yes' 
    and s.name = 'Blue';  
 
    if l_current_theme_number is not null and
    l_new_theme_style_id is not null then 
        APEX_UTIL.SET_CURRENT_THEME_STYLE( 
            p_theme_number   => l_current_theme_number, 
            p_theme_style_id => l_new_theme_style_id 
            );
 
    end if;
 
END;