Class IvyPrimefacesThemeResolver

java.lang.Object
ch.ivyteam.ivy.jsf.primefaces.theme.IvyPrimefacesThemeResolver

@Deprecated public class IvyPrimefacesThemeResolver extends Object
Deprecated.

Resolves the Primefaces themes that is used in Html Dialogs. The theme is resolved as follows:

  1. If a theme is set in the template.xhtml file header this theme is used.
  2. If a theme is set on the current session this theme is used. See setSessionTheme(String)
  3. If a theme is configured in the application configuration property 'Jsf.primefaces.theme' this theme is used.
  4. The default theme "freya-ivy-light" is used.

To set in the template.xhtml add a html header as follows:

 <h:head>
 ...
     <f:attribute name="primefaces.THEME" value="serenity-lime"/>
 ...
 </h:head>
 

To configure a theme for an application see the app.yaml and change the property 'Jsf.primefaces.theme'.

To configure a theme for a session use the method setSessionTheme(String).

Since:
16.12.2015
API:
This is a public API.
  • Method Details

    • setSessionTheme

      public void setSessionTheme(String theme)
      Deprecated.
      Sets or removes the theme that should be used by the current session.
      Parameters:
      theme - the theme to set or null if to remove the session specific theme
      API:
      This public API is available in Java.
    • getSessionTheme

      public String getSessionTheme()
      Deprecated.
      Gets the theme that is used by the current session.
      Returns:
      theme used by the current session
      API:
      This public API is available in Java.
    • getTheme

      public String getTheme(String defaultTheme)
      Deprecated.

      Gets the theme that is used in HtmlDialogs.

      To learn more about how the theme is resolved read the javadoc of the class IvyPrimefacesThemeResolver.

      Parameters:
      defaultTheme - default theme. This is used if neither a session theme nor an application theme is configured.
      Returns:
      theme to use
      API:
      This public API is available in Java.
    • getThemes

      public List<String> getThemes()
      Deprecated.

      Gets all available themes.

      If you have installed your own themes they will not automatically appear in this list. However, you can manually configure them in web.xml so that they appear here. See getCustomerThemes() for more information.

      Returns:
      list of all available themes.
      See Also:
      API:
      This public API is available in Java.
    • getCustomerThemes

      public List<String> getCustomerThemes()
      Deprecated.

      Gets the themes that are installed by the customer.

      If you have installed your own themes they will not automatically appear in this list. However, you can manually configure them in web.xml as follows so that they appear here:

       <context-param>
           <param-name>primefaces.customer.themes</param-name>
           <param-value>customer-theme1, customer-theme2</param-value>
       </context-param>
       
      Returns:
      customer themes
      See Also:
      API:
      This public API is available in Java.
    • getIvyThemes

      public List<String> getIvyThemes()
      Deprecated.

      Gets all available ivy specific themes

      Returns:
      ivy themes
      API:
      This public API is available in Java.
    • getPrimefacesAdditionalThemes

      public List<String> getPrimefacesAdditionalThemes()
      Deprecated.

      Gets all available themes from primefaces which are not part of the standard themes

      Returns:
      additional primefaces themes
      API:
      This public API is available in Java.