36.110 SET_CURRENT_THEME_STYLEプロシージャ [非推奨]

このプロシージャは、アプリケーションにユーザー・インタフェースのテーマ・スタイルを設定します。たとえば、現在のテーマで使用できるテーマ・スタイルが複数ある場合、このプロシージャを使用してアプリケーションのテーマ・スタイルを変更できます。

構文

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

パラメータ

表36-94 SET_CURRENT_THEME_STYLEのパラメータ

パラメータ 説明

p_theme_number

アプリケーションの現在のテーマ数。これは、APEX_APPLICATION_THEMESビューから取得できます。

p_theme_style_id

テーマ・スタイルの数値ID。アプリケーションで使用できるテーマ・スタイルはAPEX_APPLICATION_THEME_STYLESビューから取得できます。

次の例に、SET_CURRENT_THEME_STYLEプロシージャを使用して、現在のアプリケーション・デスクトップのテーマ・スタイルを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;