Example usage for com.liferay.portal.kernel.model LayoutTemplateConstants STANDARD_SEPARATOR

List of usage examples for com.liferay.portal.kernel.model LayoutTemplateConstants STANDARD_SEPARATOR

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model LayoutTemplateConstants STANDARD_SEPARATOR.

Prototype

String STANDARD_SEPARATOR

To view the source code for com.liferay.portal.kernel.model LayoutTemplateConstants STANDARD_SEPARATOR.

Click Source Link

Usage

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";
    }/*ww  w.  j a va2 s.co 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);
        }
    }
}