List of usage examples for com.liferay.portal.kernel.layoutconfiguration.util RuntimePageUtil getProcessedTemplate
public static StringBundler getProcessedTemplate(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String portletId, TemplateResource templateResource) throws Exception
From source file:com.liferay.application.list.taglib.display.context.logic.PanelAppContentHelper.java
License:Open Source License
public void writeContent(Writer writer) throws Exception { ThemeDisplay themeDisplay = _getThemeDisplay(); String layoutTemplateId = "max"; if (themeDisplay.isStatePopUp()) { layoutTemplateId = "pop_up"; }//w ww . j ava 2s . c om Theme theme = themeDisplay.getTheme(); String velocityTemplateId = theme.getThemeId() + LayoutTemplateConstants.STANDARD_SEPARATOR + layoutTemplateId; String content = LayoutTemplateLocalServiceUtil.getContent(layoutTemplateId, true, theme.getThemeId()); if (Validator.isNotNull(velocityTemplateId) && Validator.isNotNull(content)) { HttpServletRequest request = getOriginalHttpServletRequest(_request); StringBundler sb = RuntimePageUtil.getProcessedTemplate(request, _response, getPortletId(), new StringTemplateResource(velocityTemplateId, content)); if (sb != null) { sb.writeTo(writer); } } }