/** * Overrides the normal rendering process in order to pre-process the Context, * merging it with the screen template into a single value (identified by the * value of screenContentKey). The layout template is then merged with the * modified Context in the super class. */ @Override protected void doRender(Context context, HttpServletResponse response) throws Exception { renderScreenContent(context); // Velocity context now includes any mappings that were defined // (via #set) in screen content template. // The screen template can overrule the layout by doing // #set( $layout = "MyLayout.vm" ) String layoutUrlToUse = (String) context.get(this.layoutKey); if (layoutUrlToUse != null) { if (logger.isDebugEnabled()) { logger.debug("Screen content template has requested layout [" + layoutUrlToUse + "]"); } } else { // No explicit layout URL given -> use default layout of this view. layoutUrlToUse = this.layoutUrl; } mergeTemplate(getTemplate(layoutUrlToUse), context, response); }
/** * Overrides the normal rendering process in order to pre-process the Context, * merging it with the screen template into a single value (identified by the * value of screenContentKey). The layout template is then merged with the * modified Context in the super class. */ @Override protected void doRender(Context context, HttpServletResponse response) throws Exception { renderScreenContent(context); // Velocity context now includes any mappings that were defined // (via #set) in screen content template. // The screen template can overrule the layout by doing // #set( $layout = "MyLayout.vm" ) String layoutUrlToUse = (String) context.get(this.layoutKey); if (layoutUrlToUse != null) { if (logger.isDebugEnabled()) { logger.debug("Screen content template has requested layout [" + layoutUrlToUse + "]"); } } else { // No explicit layout URL given -> use default layout of this view. layoutUrlToUse = this.layoutUrl; } mergeTemplate(getTemplate(layoutUrlToUse), context, response); }
/** * Overrides the normal rendering process in order to pre-process the Context, * merging it with the screen template into a single value (identified by the * value of screenContentKey). The layout template is then merged with the * modified Context in the super class. */ @Override protected void doRender(Context context, HttpServletResponse response) throws Exception { renderScreenContent(context); // Velocity context now includes any mappings that were defined // (via #set) in screen content template. // The screen template can overrule the layout by doing // #set( $layout = "MyLayout.vm" ) String layoutUrlToUse = (String) context.get(this.layoutKey); if (layoutUrlToUse != null) { if (logger.isDebugEnabled()) { logger.debug("Screen content template has requested layout [" + layoutUrlToUse + "]"); } } else { // No explicit layout URL given -> use default layout of this view. layoutUrlToUse = this.layoutUrl; } mergeTemplate(getTemplate(layoutUrlToUse), context, response); }