Example usage for com.liferay.portal.util PropsValues LAYOUT_PARALLEL_RENDER_ENABLE

List of usage examples for com.liferay.portal.util PropsValues LAYOUT_PARALLEL_RENDER_ENABLE

Introduction

In this page you can find the example usage for com.liferay.portal.util PropsValues LAYOUT_PARALLEL_RENDER_ENABLE.

Prototype

boolean LAYOUT_PARALLEL_RENDER_ENABLE

To view the source code for com.liferay.portal.util PropsValues LAYOUT_PARALLEL_RENDER_ENABLE.

Click Source Link

Usage

From source file:com.liferay.portlet.layoutconfiguration.util.velocity.PortletColumnLogic.java

License:Open Source License

public PortletColumnLogic(ServletContext servletContext, HttpServletRequest request,
        HttpServletResponse response) {// ww w.j a v  a 2 s  .c  o m

    _servletContext = servletContext;
    _request = request;
    _response = response;
    _themeDisplay = (ThemeDisplay) _request.getAttribute(WebKeys.THEME_DISPLAY);
    _portletsMap = new TreeMap<Portlet, Object[]>(new PortletRenderWeightComparator());

    _parallelRenderEnable = PropsValues.LAYOUT_PARALLEL_RENDER_ENABLE;

    if (_parallelRenderEnable) {
        if (PropsValues.SESSION_DISABLED) {
            if (_log.isWarnEnabled()) {
                _log.warn("Parallel rendering should be disabled if sessions " + "are disabled");
            }
        }
    }

    if (_parallelRenderEnable) {
        Boolean portletParallelRender = (Boolean) request.getAttribute(WebKeys.PORTLET_PARALLEL_RENDER);

        if ((portletParallelRender != null) && (portletParallelRender.booleanValue() == false)) {

            _parallelRenderEnable = false;
        }
    } else {
        request.removeAttribute(WebKeys.PORTLET_PARALLEL_RENDER);
    }
}