List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay isStatePopUp
public boolean isStatePopUp()
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 . jav a 2s . c o m 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); } } }