57.8 SET_SESSION_STYLE_CSS Procedure

This procedure sets the theme style CSS URLs dynamically for the current session. Theme style CSS URLs directly pass in; a persistent style definition is optional. This is typically called after successful authentication.

Syntax

APEX_THEME.SET_SESSION_STYLE_CSS (
    p_application_id   IN NUMBER    DEFAULT {current application ID},
    p_theme_number     IN NUMBER    DEFAULT {current theme number},
    p_css_file_urls    IN VARCHAR2,
    p_page_css_classes IN VARCHAR2  DEFAULT NULL );

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. Default is the current theme of the application.
p_css_file_urls The URLs to CSS files with style directives.
p_page_css_classes Class names which are added to the PAGE_CSS_CLASSES placeholder.

Example

The following example gets available theme styles from Oracle APEX Dictionary View and sets the session theme style for the current theme to #APP_FILES#.my_style.css.

DECLARE
    l_theme_number number;
BEGIN
    select theme_number
      into l_theme_number
      from apex_application_themes
     where t.application_id = :APP_ID;

    apex_theme.set_session_style_css (
        p_theme_number  => l_theme_number,
        p_css_file_urls => '#APP_FILES#my_style.css' );
END;