Class DecoratorUtil


  • public class DecoratorUtil
    extends Object
    This class provides helper methods for deferred rendering of page sections in main decorator
    Since:
    5.10
    • Constructor Detail

      • DecoratorUtil

        public DecoratorUtil()
    • Method Detail

      • setSidebarContext

        public static void setSidebarContext​(Space space,
                                             AbstractPage page,
                                             String pageId,
                                             String context,
                                             String contextKey,
                                             String collectorKey)
        Page/blogpost context should be saved for deferred (sitemesh) sidebar execution, because main sitemesh decorator is executed under DecoratorAction, which does not contain page/space context of the main request. Context is saved as attribute in HttpServletRequest.
        Parameters:
        page - current page
        pageId - current page id
        context - execution context name
        contextKey - context key
        collectorKey - collector key
        Since:
        5.10
      • setContentNavContext

        public static void setContentNavContext​(AbstractPage page,
                                                String mode,
                                                String context,
                                                ThemeHelper helper)
        Page/blogpost context should be saved for deferred (sitemesh) content navigation execution, because main sitemesh decorator is executed under DecoratorAction, which does not contain page/space context of the main request. Context is saved as attribute in HttpServletRequest.
        Parameters:
        page - current page
        mode - mode
        context - execution context name
        helper - page helper
        Since:
        5.10
      • hasSidebarContext

        public static boolean hasSidebarContext()
        Methods returns true if sidebar context was set to http request, false otherwise
        Since:
        5.10
      • hasContentNavContext

        public static boolean hasContentNavContext()
        Methods returns true if content navigation context was set to http request, false otherwise
        Since:
        5.10