Interface ThemeURIHandler

  • All Known Implementing Classes:
    TabletThemeURIHandler

    public interface ThemeURIHandler
    Used to add theme uri dynamically without extending any ThemeProvider. Different from ThemeProvider, ThemeURIHandler is composable with other ThemeURIHandler.

    When a desktop is about to be rendered, modifyThemeURIs(org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.util.ThemeURIModifier) will be called before ThemeProvider to allow developer to add CSS/WCS files. The earlier the ThemeURIHandler being added to Configuration is processed earlier. (first-in-first-out). Note: ThemeProvider still has the final decision. ThemeURIHandler will always be executed.

    Since:
    9.6.0
    Author:
    leon
    • Method Detail

      • modifyThemeURIs

        void modifyThemeURIs​(Execution exec,
                             ThemeURIModifier modifier)
        Allow developer to modify the theme uri list through ThemeURIModifier when a desktop is about to be rendered.
        Parameters:
        exec - the current execution (never null), where you can retrieve the desktop, request and response. Note: if your Web application supports multiple devices, you have to check Desktop.getDevice().
        modifier - ThemeURIModifier provide methods (e.g. add(StyleSheet uri)) to modify the theme uri list.