26.9 SET_USER_STYLE Procedure

This procedure sets a theme style user preference for the current user and application. Theme Style User Preferences are automatically picked up and precede any style set with SET_SESSION_STYLE.


procedure set_user_style(
    p_application_id  IN NUMBER           DEFAULT  {current application id},
    p_user            IN VARCHAR2         DEFAULT {current user},
    p_theme_number    IN NUMBER           DEFAULT {current theme number},
    p_id              IN NUMBER


Table 26-9 SET_USER_STYLE Procedure

Parameter Description


The application to set the user style preference.


The user name to the user style preference.


The theme number to set the user style preference.


The ID of the theme style to set as a user preference.


The following example gets available theme styles from Application Express Dictionary View for the DESKTOP user interface.

select s.theme_style_id, t.theme_number
  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 s.is_current = 'Yes'

The following example sets the current theme style id's as user preference for ADMIN in application ID 100.

apex_theme.set_user_style (
     p_application_id => 100,
     p_user           => 'ADMIN',
     p_theme_number   => {query.theme_number},
     p_id             => {query.theme_style_id}