Example usage for com.liferay.portal.kernel.util JavaConstants JAVAX_PORTLET_RESPONSE

List of usage examples for com.liferay.portal.kernel.util JavaConstants JAVAX_PORTLET_RESPONSE

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util JavaConstants JAVAX_PORTLET_RESPONSE.

Prototype

String JAVAX_PORTLET_RESPONSE

To view the source code for com.liferay.portal.kernel.util JavaConstants JAVAX_PORTLET_RESPONSE.

Click Source Link

Usage

From source file:com.liferay.taglib.portlet.ActionURLTag.java

License:Open Source License

private static LiferayPortletURL _getLiferayPortletURL(HttpServletRequest request, long plid,
        String portletName, String lifecycle) {

    PortletRequest portletRequest = (PortletRequest) request.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);

    if (portletRequest == null) {
        return null;
    }//from  ww  w  .  ja  v a  2s  .  c o  m

    PortletResponse portletResponse = (PortletResponse) request
            .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

    LiferayPortletResponse liferayPortletResponse = PortalUtil.getLiferayPortletResponse(portletResponse);

    return liferayPortletResponse.createLiferayPortletURL(plid, portletName, lifecycle);
}

From source file:com.liferay.taglib.portlet.DefineObjectsTag.java

License:Open Source License

@Override
public int doStartTag() {
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

    String lifecycle = (String) request.getAttribute(PortletRequest.LIFECYCLE_PHASE);

    PortletConfig portletConfig = (PortletConfig) request.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);

    if (portletConfig != null) {
        pageContext.setAttribute("portletConfig", portletConfig);
        pageContext.setAttribute("portletName", portletConfig.getPortletName());
    }// w  w w .j a  v a 2 s.co  m

    PortletRequest portletRequest = (PortletRequest) request.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);

    if (portletRequest != null) {
        pageContext.setAttribute("liferayPortletRequest", PortalUtil.getLiferayPortletRequest(portletRequest));

        String portletRequestAttrName = null;

        if (lifecycle.equals(PortletRequest.ACTION_PHASE)) {
            portletRequestAttrName = "actionRequest";
        } else if (lifecycle.equals(PortletRequest.EVENT_PHASE)) {
            portletRequestAttrName = "eventRequest";
        } else if (lifecycle.equals(PortletRequest.RENDER_PHASE)) {
            portletRequestAttrName = "renderRequest";
        } else if (lifecycle.equals(PortletRequest.RESOURCE_PHASE)) {
            portletRequestAttrName = "resourceRequest";
        }

        pageContext.setAttribute(portletRequestAttrName, portletRequest);

        PortletPreferences portletPreferences = portletRequest.getPreferences();

        pageContext.setAttribute("portletPreferences", portletPreferences);
        pageContext.setAttribute("portletPreferencesValues", portletPreferences.getMap());

        PortletSession portletSession = portletRequest.getPortletSession();

        pageContext.setAttribute("portletSession", portletSession);

        try {
            pageContext.setAttribute("portletSessionScope", portletSession.getAttributeMap());
        } catch (IllegalStateException ise) {
        }
    }

    PortletResponse portletResponse = (PortletResponse) request
            .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

    if (portletResponse != null) {
        pageContext.setAttribute("liferayPortletResponse",
                PortalUtil.getLiferayPortletResponse(portletResponse));

        String portletResponseAttrName = null;

        if (lifecycle.equals(PortletRequest.ACTION_PHASE)) {
            portletResponseAttrName = "actionResponse";
        } else if (lifecycle.equals(PortletRequest.EVENT_PHASE)) {
            portletResponseAttrName = "eventResponse";
        } else if (lifecycle.equals(PortletRequest.RENDER_PHASE)) {
            portletResponseAttrName = "renderResponse";
        } else if (lifecycle.equals(PortletRequest.RESOURCE_PHASE)) {
            portletResponseAttrName = "resourceResponse";
        }

        pageContext.setAttribute(portletResponseAttrName, portletResponse);
    }

    return SKIP_BODY;
}

From source file:com.liferay.taglib.portlet.NamespaceTag.java

License:Open Source License

@Override
public int doStartTag() throws JspException {
    try {//from w ww.  jav  a 2  s  .  c o  m
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

        PortletResponse portletResponse = (PortletResponse) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

        if (portletResponse != null) {
            String namespace = portletResponse.getNamespace();

            JspWriter jspWriter = pageContext.getOut();

            jspWriter.write(namespace);
        }
    } catch (Exception e) {
        throw new JspException(e);
    }

    return SKIP_BODY;
}

From source file:com.liferay.taglib.portletext.RuntimeTag.java

License:Open Source License

public static void doTag(String portletName, String queryString, String defaultPreferences,
        PageContext pageContext, ServletContext servletContext, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    if (pageContext != null) {
        response = new PipingServletResponse(response, pageContext.getOut());
    }/*  www  .  jav a  2s. c  o m*/

    PortletRequest portletRequest = (PortletRequest) request.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);

    RenderRequest renderRequest = null;

    if ((portletRequest != null) && (portletRequest instanceof RenderRequest)) {

        renderRequest = (RenderRequest) portletRequest;
    }

    PortletResponse portletResponse = (PortletResponse) request
            .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

    RenderResponse renderResponse = null;

    if ((portletResponse != null) && (portletResponse instanceof RenderResponse)) {

        renderResponse = (RenderResponse) portletResponse;
    }

    String portletId = portletName;

    try {
        request.setAttribute(WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE);

        if (Validator.isNotNull(defaultPreferences)) {
            PortletPreferencesFactoryUtil.getPortletSetup(request, portletId, defaultPreferences);
        }

        RuntimePortletUtil.processPortlet(servletContext, request, response, renderRequest, renderResponse,
                portletId, queryString, true);

        Set<String> runtimePortletIds = (Set<String>) request.getAttribute(WebKeys.RUNTIME_PORTLET_IDS);

        if (runtimePortletIds == null) {
            runtimePortletIds = new HashSet<String>();
        }

        runtimePortletIds.add(portletName);

        request.setAttribute(WebKeys.RUNTIME_PORTLET_IDS, runtimePortletIds);
    } finally {
        request.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE);
    }
}

From source file:com.liferay.taglib.ui.SearchContainerTag.java

License:Open Source License

@Override
public int doStartTag() throws JspException {
    try {/*from w  ww.j  a va2s  . c o  m*/
        HttpServletRequest request = getServletRequest();

        PortletRequest portletRequest = (PortletRequest) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);
        PortletResponse portletResponse = (PortletResponse) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

        if (_iteratorURL == null) {
            _iteratorURL = ((MimeResponse) portletResponse).createRenderURL();
        }

        if (_searchContainer == null) {
            _searchContainer = new SearchContainer<R>(portletRequest, _displayTerms, _searchTerms,
                    getCurParam(), getDelta(), _iteratorURL, null, _emptyResultsMessage);
        }

        _searchContainer.setDeltaConfigurable(_deltaConfigurable);
        _searchContainer.setId(_id);

        if (_headerNames != null) {
            _searchContainer.setHeaderNames(_headerNames);
        }

        _searchContainer.setHover(_hover);

        if (Validator.isNotNull(_orderByColParam)) {
            _searchContainer.setOrderByColParam(_orderByColParam);
        }

        if (Validator.isNotNull(_orderByCol)) {
            _searchContainer.setOrderByCol(_orderByCol);
        }

        if (_orderByComparator != null) {
            _searchContainer.setOrderByComparator(_orderByComparator);
        }

        if (Validator.isNotNull(_orderByTypeParam)) {
            _searchContainer.setOrderByTypeParam(_orderByTypeParam);
        }

        if (Validator.isNotNull(_orderByType)) {
            _searchContainer.setOrderByType(_orderByType);
        }

        if (_rowChecker != null) {
            _searchContainer.setRowChecker(_rowChecker);
        }

        pageContext.setAttribute(_var, _searchContainer);

        return EVAL_BODY_INCLUDE;
    } catch (Exception e) {
        throw new JspException(e);
    }
}

From source file:com.liferay.taglib.ui.SectionTag.java

License:Open Source License

@Override
public int doStartTag() throws JspException {
    try {/*from w ww.  j  av a2s .c  o  m*/
        _tabsTag = (TabsTag) findAncestorWithClass(this, TabsTag.class);

        if (_tabsTag == null) {
            throw new JspException();
        }

        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

        PortletResponse portletResponse = (PortletResponse) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

        String namespace = StringPool.BLANK;

        if (portletResponse != null) {
            namespace = portletResponse.getNamespace();
        }

        String sectionParam = _tabsTag.getParam();
        String sectionName = _tabsTag.getSectionName();
        _sectionSelected = Boolean.valueOf(_tabsTag.getSectionSelected());
        String sectionScroll = namespace + sectionParam + "TabsScroll";
        String sectionRedirectParams = "&scroll=" + sectionScroll + "&" + sectionParam + "=" + sectionName;

        _tabsTag.incrementSection();

        request.setAttribute("liferay-ui:section:param", sectionParam);
        request.setAttribute("liferay-ui:section:name", sectionName);
        request.setAttribute("liferay-ui:section:selected", _sectionSelected);
        request.setAttribute("liferay-ui:section:scroll", sectionScroll);

        pageContext.setAttribute("sectionSelected", _sectionSelected);
        pageContext.setAttribute("sectionParam", sectionParam);
        pageContext.setAttribute("sectionName", sectionName);
        pageContext.setAttribute("sectionScroll", sectionScroll);
        pageContext.setAttribute("sectionRedirectParams", sectionRedirectParams);

        include(getStartPage());

        if (!_tabsTag.isRefresh() || _sectionSelected.booleanValue()) {
            return EVAL_BODY_INCLUDE;
        } else {
            return EVAL_PAGE;
        }
    } catch (Exception e) {
        throw new JspException(e);
    }
}

From source file:com.liferay.user.groups.admin.item.selector.web.internal.display.context.UserGroupItemSelectorViewDisplayContext.java

License:Open Source License

public UserGroupItemSelectorViewDisplayContext(UserGroupLocalService userGroupLocalService,
        UsersAdmin usersAdmin, HttpServletRequest httpServletRequest, PortletURL portletURL,
        String itemSelectedEventName) {

    _userGroupLocalService = userGroupLocalService;
    _usersAdmin = usersAdmin;/*from   w  w  w . j  av  a2  s  . c o  m*/
    _httpServletRequest = httpServletRequest;
    _portletURL = portletURL;
    _itemSelectedEventName = itemSelectedEventName;

    _renderRequest = (RenderRequest) httpServletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);
    _renderResponse = (RenderResponse) httpServletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);
}

From source file:com.liferay.users.admin.item.selector.web.internal.display.context.UserItemSelectorViewDisplayContext.java

License:Open Source License

public UserItemSelectorViewDisplayContext(UserLocalService userLocalService, UsersAdmin usersAdmin,
        HttpServletRequest httpServletRequest, PortletURL portletURL, String itemSelectedEventName) {

    _userLocalService = userLocalService;
    _usersAdmin = usersAdmin;//from w  w w .ja v a 2  s.  c o  m
    _httpServletRequest = httpServletRequest;
    _portletURL = portletURL;
    _itemSelectedEventName = itemSelectedEventName;

    _portletRequest = (PortletRequest) httpServletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);
    _renderResponse = (RenderResponse) httpServletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);
}

From source file:com.siemens.sw360.portal.tags.NameSpaceAwareTag.java

License:Open Source License

protected String getNamespace() throws JspException {
    try {/*  w ww. j a v  a  2s . c  o m*/
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

        PortletResponse portletResponse = (PortletResponse) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

        if (portletResponse != null) {
            return portletResponse.getNamespace();
        } else {
            throw new JspException("Not in a portlet?");
        }
    } catch (Exception e) {
        throw new JspException(e);
    }
}

From source file:org.apache.jsp.html.portlet.ext.struts_005fincludes.forms.struts_005fdiv_005fboolean_jsp.java

License:Open Source License

public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;//  w  w w.  j a  va  2  s.com
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
        _jspxFactory = JspFactory.getDefaultFactory();
        response.setContentType("text/html; charset=UTF-8");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        /**
         * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
         *
         * Permission is hereby granted, free of charge, to any person obtaining a copy
         * of this software and associated documentation files (the "Software"), to deal
         * in the Software without restriction, including without limitation the rights
         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         * copies of the Software, and to permit persons to whom the Software is
         * furnished to do so, subject to the following conditions:
         *
         * The above copyright notice and this permission notice shall be included in
         * all copies or substantial portions of the Software.
         *
         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         * SOFTWARE.
         */

        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        //  liferay-theme:defineObjects
        com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.theme.DefineObjectsTag.class);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doStartTag();
        if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
        com.liferay.portal.theme.ThemeDisplay themeDisplay = null;
        com.liferay.portal.model.Company company = null;
        com.liferay.portal.model.Account account = null;
        com.liferay.portal.model.User user = null;
        com.liferay.portal.model.User realUser = null;
        com.liferay.portal.model.Contact contact = null;
        com.liferay.portal.model.Layout layout = null;
        java.util.List layouts = null;
        java.lang.Long plid = null;
        com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null;
        java.lang.Long portletGroupId = null;
        com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker = null;
        java.util.Locale locale = null;
        java.util.TimeZone timeZone = null;
        com.liferay.portal.model.Theme theme = null;
        com.liferay.portal.model.ColorScheme colorScheme = null;
        com.liferay.portal.theme.PortletDisplay portletDisplay = null;
        themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay");
        company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company");
        account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account");
        user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user");
        realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser");
        contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact");
        layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout");
        layouts = (java.util.List) _jspx_page_context.findAttribute("layouts");
        plid = (java.lang.Long) _jspx_page_context.findAttribute("plid");
        layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context
                .findAttribute("layoutTypePortlet");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        permissionChecker = (com.liferay.portal.kernel.security.permission.PermissionChecker) _jspx_page_context
                .findAttribute("permissionChecker");
        locale = (java.util.Locale) _jspx_page_context.findAttribute("locale");
        timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone");
        theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme");
        colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme");
        portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context
                .findAttribute("portletDisplay");
        out.write("\r\n");
        out.write("\r\n");

        /**
         * Copyright (c) 2000-2006 Liferay, LLC. All rights reserved.
         *
         * Permission is hereby granted, free of charge, to any person obtaining a copy
         * of this software and associated documentation files (the "Software"), to deal
         * in the Software without restriction, including without limitation the rights
         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         * copies of the Software, and to permit persons to whom the Software is
         * furnished to do so, subject to the following conditions:
         *
         * The above copyright notice and this permission notice shall be included in
         * all copies or substantial portions of the Software.
         *
         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         * SOFTWARE.
         */

        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        //@ page import="com.liferay.portal.kernel.util.PortletExtKeys" 
        out.write("\r\n");
        out.write("\r\n");

        String contextPath = PropsUtil.get(PropsUtil.PORTAL_CTX);
        if (contextPath.equals("/")) {
            contextPath = "";
        }

        out.write('\r');
        out.write('\n');
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        try {
            String namespace = ((RenderResponse) request
                    .getAttribute(com.liferay.portal.kernel.util.JavaConstants.JAVAX_PORTLET_RESPONSE))
                            .getNamespace();

            String formFieldName;
            String formFieldKey;
            boolean required;
            String formFieldType;
            String value = null;
            String fieldDateFormat = "";
            boolean hidden;
            boolean readonly;
            String collectionName;
            String collectionAttrName;
            String collectionProperty;
            String collectionLabel;
            int field_size;
            int textAreaCols;
            int textAreaRows;
            int popupWidth;
            int popupHeight;
            String helpMessage = null;
            com.ext.sql.StrutsFormFields form_field;

            boolean textAreaHtmlFlag = false;
            String onChange = "";
            String lookupAction = "";
            boolean previous_fieldset = false;
            boolean secretField = false;

            form_field = (com.ext.sql.StrutsFormFields) request.getAttribute(namespace + "_STRUTS_DIV_FIELD");

            formFieldName = form_field.getFormFieldName();
            formFieldKey = form_field.getFormFieldKey();
            formFieldType = form_field.getFormFieldType();
            fieldDateFormat = form_field.getDateFormat();
            if (fieldDateFormat == null || fieldDateFormat.equals(""))
                fieldDateFormat = CommonDefs.DATE_FORMAT_JSCRIPT;
            hidden = form_field.isHidden();
            readonly = form_field.isReadonly();
            required = form_field.isRequired();
            collectionName = form_field.getCollectionName();
            collectionAttrName = form_field.getCollectionAttrName();
            collectionProperty = form_field.getCollectionProperty();
            collectionLabel = form_field.getCollectionLabel();
            field_size = form_field.getField_size();
            textAreaCols = form_field.getTextAreaCols();
            textAreaRows = form_field.getTextAreaRows();
            popupWidth = form_field.getPopupWidth();
            popupHeight = form_field.getPopupHeight();
            secretField = form_field.isSecretTextField();
            helpMessage = form_field.getHelpMessage();
            String colour = null;
            String bgcolour = null;
            value = form_field.getValue();
            if (Validator.isNull(value) && Validator.isNotNull(request.getParameter(formFieldName)))
                value = request.getParameter(formFieldName);
            colour = form_field.getColour();
            bgcolour = colour;
            if (colour != null && colour.equals("inherit"))
                bgcolour = null;
            // force span colour to always be the default
            colour = "inherit";

            if (formFieldType.equals("boolean")) {
                onChange = (form_field.getOnChange() != null) ? form_field.getOnChange() : "";

                if (form_field.isDynamicField()) {
                    if (hidden) {
                        out.write("\r\n");
                        out.write("    \t \t<input alt=\" \" type=\"hidden\" id=\"");
                        out.print(formFieldName);
                        out.write("\" name=\"");
                        out.print(formFieldName);
                        out.write("\" value=\"");
                        out.print((value != null ? value : ""));
                        out.write("\">\r\n");
                        out.write("     \t\t");

                    } else {
                        out.write("\r\n");
                        out.write("\t\t\t\t<div class=\"ctrl-holder\">\r\n");
                        out.write("\t\t\t\t<label style=\"color:");
                        out.print(colour);
                        out.write("\" for=\"");
                        out.print(formFieldName);
                        out.write('"');
                        out.write('>');
                        out.print(LanguageUtil.get(pageContext, formFieldKey));
                        out.write("</label>\r\n");
                        out.write("\r\n");
                        out.write("\t     \t");
                        if (readonly) {
                            out.write("\r\n");
                            out.write("\t     \t<input alt=\" \" type=\"hidden\" id=\"");
                            out.print(formFieldName);
                            out.write("\" name=\"");
                            out.print(formFieldName);
                            out.write("\" value=\"");
                            out.print((value != null ? value : ""));
                            out.write("\">\r\n");
                            out.write("\t     \t<input alt=\"");
                            out.print(formFieldName);
                            out.write("\" type=\"checkbox\" id=\"");
                            out.print(formFieldName + "_");
                            out.write("\" name=\"");
                            out.print(formFieldName);
                            out.write("\" disabled=\"");
                            out.print(readonly);
                            out.write("\" value=\"true\" ");
                            if (value != null && value.equals("true")) {
                                out.write(" checked=\"true\" ");
                            }
                            out.write(" >\r\n");
                            out.write("\t     \t");
                        } else {
                            out.write("\r\n");
                            out.write("\t     \t");
                            if (bgcolour != null && !bgcolour.equals("")) {
                                out.write("\r\n");
                                out.write("\t     \t<span class=\"FormArea\" style=\"background-color:");
                                out.print(bgcolour);
                                out.write(";\">\r\n");
                                out.write("\t     \t");
                            }
                            out.write("\r\n");
                            out.write("\t     \t<input alt=\"");
                            out.print(formFieldName);
                            out.write("\" type=\"checkbox\" id=\"");
                            out.print(formFieldName);
                            out.write("\" name=\"");
                            out.print(formFieldName);
                            out.write("\" value=\"true\" ");
                            if (value != null && value.equals("true")) {
                                out.write(" checked=\"true\" ");
                            }
                            out.write(" >\r\n");
                            out.write("\t     \t");
                            if (bgcolour != null && !bgcolour.equals("")) {
                                out.write("\r\n");
                                out.write("\t     \t</span>\r\n");
                                out.write("\t     \t");
                            }
                            out.write("\r\n");
                            out.write("\t     \t");
                        }
                        out.write("\r\n");
                        out.write("\t     \t");
                        if (required) {
                            out.write("<em>*</em>");
                        }
                        out.write("\r\n");
                        out.write("\t     \t");
                        if (helpMessage != null) {
                            out.write("\r\n");
                            out.write("\t\t\t\t");
                            //  liferay-ui:icon-help
                            com.liferay.taglib.ui.IconHelpTag _jspx_th_liferay_002dui_005ficon_002dhelp_005f0 = (com.liferay.taglib.ui.IconHelpTag) _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_005fmessage_005fnobody
                                    .get(com.liferay.taglib.ui.IconHelpTag.class);
                            _jspx_th_liferay_002dui_005ficon_002dhelp_005f0.setPageContext(_jspx_page_context);
                            _jspx_th_liferay_002dui_005ficon_002dhelp_005f0.setParent(null);
                            _jspx_th_liferay_002dui_005ficon_002dhelp_005f0.setMessage(helpMessage);
                            int _jspx_eval_liferay_002dui_005ficon_002dhelp_005f0 = _jspx_th_liferay_002dui_005ficon_002dhelp_005f0
                                    .doStartTag();
                            if (_jspx_th_liferay_002dui_005ficon_002dhelp_005f0
                                    .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_005fmessage_005fnobody
                                        .reuse(_jspx_th_liferay_002dui_005ficon_002dhelp_005f0);
                                return;
                            }
                            _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_005fmessage_005fnobody
                                    .reuse(_jspx_th_liferay_002dui_005ficon_002dhelp_005f0);
                            out.write("\r\n");
                            out.write("\t\t    ");
                        }
                        out.write("\r\n");
                        out.write("    \t ");
                        //  html:errors
                        org.apache.struts.taglib.html.ErrorsTag _jspx_th_html_005ferrors_005f0 = (org.apache.struts.taglib.html.ErrorsTag) _005fjspx_005ftagPool_005fhtml_005ferrors_005fproperty_005fnobody
                                .get(org.apache.struts.taglib.html.ErrorsTag.class);
                        _jspx_th_html_005ferrors_005f0.setPageContext(_jspx_page_context);
                        _jspx_th_html_005ferrors_005f0.setParent(null);
                        _jspx_th_html_005ferrors_005f0.setProperty(formFieldName);
                        int _jspx_eval_html_005ferrors_005f0 = _jspx_th_html_005ferrors_005f0.doStartTag();
                        if (_jspx_th_html_005ferrors_005f0
                                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005fhtml_005ferrors_005fproperty_005fnobody
                                    .reuse(_jspx_th_html_005ferrors_005f0);
                            return;
                        }
                        _005fjspx_005ftagPool_005fhtml_005ferrors_005fproperty_005fnobody
                                .reuse(_jspx_th_html_005ferrors_005f0);
                        out.write("\r\n");
                        out.write("\t     \t</div>\r\n");
                        out.write("\t ");
                    }

                } else {

                    if (hidden) {
                        out.write("\r\n");
                        out.write("    \t \t");
                        //  html:hidden
                        org.apache.struts.taglib.html.HiddenTag _jspx_th_html_005fhidden_005f0 = (org.apache.struts.taglib.html.HiddenTag) _005fjspx_005ftagPool_005fhtml_005fhidden_005fproperty_005fnobody
                                .get(org.apache.struts.taglib.html.HiddenTag.class);
                        _jspx_th_html_005fhidden_005f0.setPageContext(_jspx_page_context);
                        _jspx_th_html_005fhidden_005f0.setParent(null);
                        _jspx_th_html_005fhidden_005f0.setProperty(formFieldName);
                        int _jspx_eval_html_005fhidden_005f0 = _jspx_th_html_005fhidden_005f0.doStartTag();
                        if (_jspx_th_html_005fhidden_005f0
                                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005fhtml_005fhidden_005fproperty_005fnobody
                                    .reuse(_jspx_th_html_005fhidden_005f0);
                            return;
                        }
                        _005fjspx_005ftagPool_005fhtml_005fhidden_005fproperty_005fnobody
                                .reuse(_jspx_th_html_005fhidden_005f0);
                        out.write("\r\n");
                        out.write("     \t\t");

                    } else {
                        out.write("\r\n");
                        out.write("    <div class=\"ctrl-holder\">\r\n");
                        out.write("\t\t<label for=\"");
                        out.print(formFieldName);
                        out.write('"');
                        out.write('>');
                        out.print(LanguageUtil.get(pageContext, formFieldKey));
                        out.write("</label>\r\n");
                        out.write("\t     ");
                        //  html:checkbox
                        org.apache.struts.taglib.html.CheckboxTag _jspx_th_html_005fcheckbox_005f0 = (org.apache.struts.taglib.html.CheckboxTag) _005fjspx_005ftagPool_005fhtml_005fcheckbox_005fproperty_005fonchange_005fdisabled_005falt_005fnobody
                                .get(org.apache.struts.taglib.html.CheckboxTag.class);
                        _jspx_th_html_005fcheckbox_005f0.setPageContext(_jspx_page_context);
                        _jspx_th_html_005fcheckbox_005f0.setParent(null);
                        _jspx_th_html_005fcheckbox_005f0.setAlt(LanguageUtil.get(pageContext, formFieldKey));
                        _jspx_th_html_005fcheckbox_005f0.setProperty(formFieldName);
                        _jspx_th_html_005fcheckbox_005f0.setOnchange(onChange);
                        _jspx_th_html_005fcheckbox_005f0.setDisabled(readonly);
                        int _jspx_eval_html_005fcheckbox_005f0 = _jspx_th_html_005fcheckbox_005f0.doStartTag();
                        if (_jspx_th_html_005fcheckbox_005f0
                                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005fhtml_005fcheckbox_005fproperty_005fonchange_005fdisabled_005falt_005fnobody
                                    .reuse(_jspx_th_html_005fcheckbox_005f0);
                            return;
                        }
                        _005fjspx_005ftagPool_005fhtml_005fcheckbox_005fproperty_005fonchange_005fdisabled_005falt_005fnobody
                                .reuse(_jspx_th_html_005fcheckbox_005f0);
                        if (required) {
                            out.write("<em>*</em>");
                        }
                        out.write("\r\n");
                        out.write("\t     \t");
                        if (readonly) {
                            out.write("\r\n");
                            out.write("\t     \t");
                            //  html:hidden
                            org.apache.struts.taglib.html.HiddenTag _jspx_th_html_005fhidden_005f1 = (org.apache.struts.taglib.html.HiddenTag) _005fjspx_005ftagPool_005fhtml_005fhidden_005fproperty_005fnobody
                                    .get(org.apache.struts.taglib.html.HiddenTag.class);
                            _jspx_th_html_005fhidden_005f1.setPageContext(_jspx_page_context);
                            _jspx_th_html_005fhidden_005f1.setParent(null);
                            _jspx_th_html_005fhidden_005f1.setProperty(formFieldName);
                            int _jspx_eval_html_005fhidden_005f1 = _jspx_th_html_005fhidden_005f1.doStartTag();
                            if (_jspx_th_html_005fhidden_005f1
                                    .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                _005fjspx_005ftagPool_005fhtml_005fhidden_005fproperty_005fnobody
                                        .reuse(_jspx_th_html_005fhidden_005f1);
                                return;
                            }
                            _005fjspx_005ftagPool_005fhtml_005fhidden_005fproperty_005fnobody
                                    .reuse(_jspx_th_html_005fhidden_005f1);
                            out.write("\r\n");
                            out.write("\t     \t");
                        }
                        out.write("\r\n");
                        out.write("    \t \t");
                        if (helpMessage != null) {
                            out.write("\r\n");
                            out.write("\t\t\t\t");
                            //  liferay-ui:icon-help
                            com.liferay.taglib.ui.IconHelpTag _jspx_th_liferay_002dui_005ficon_002dhelp_005f1 = (com.liferay.taglib.ui.IconHelpTag) _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_005fmessage_005fnobody
                                    .get(com.liferay.taglib.ui.IconHelpTag.class);
                            _jspx_th_liferay_002dui_005ficon_002dhelp_005f1.setPageContext(_jspx_page_context);
                            _jspx_th_liferay_002dui_005ficon_002dhelp_005f1.setParent(null);
                            _jspx_th_liferay_002dui_005ficon_002dhelp_005f1.setMessage(helpMessage);
                            int _jspx_eval_liferay_002dui_005ficon_002dhelp_005f1 = _jspx_th_liferay_002dui_005ficon_002dhelp_005f1
                                    .doStartTag();
                            if (_jspx_th_liferay_002dui_005ficon_002dhelp_005f1
                                    .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_005fmessage_005fnobody
                                        .reuse(_jspx_th_liferay_002dui_005ficon_002dhelp_005f1);
                                return;
                            }
                            _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_005fmessage_005fnobody
                                    .reuse(_jspx_th_liferay_002dui_005ficon_002dhelp_005f1);
                            out.write("\r\n");
                            out.write("\t\t    ");
                        }
                        out.write("\r\n");
                        out.write("    \t \t");
                        //  html:errors
                        org.apache.struts.taglib.html.ErrorsTag _jspx_th_html_005ferrors_005f1 = (org.apache.struts.taglib.html.ErrorsTag) _005fjspx_005ftagPool_005fhtml_005ferrors_005fproperty_005fnobody
                                .get(org.apache.struts.taglib.html.ErrorsTag.class);
                        _jspx_th_html_005ferrors_005f1.setPageContext(_jspx_page_context);
                        _jspx_th_html_005ferrors_005f1.setParent(null);
                        _jspx_th_html_005ferrors_005f1.setProperty(formFieldName);
                        int _jspx_eval_html_005ferrors_005f1 = _jspx_th_html_005ferrors_005f1.doStartTag();
                        if (_jspx_th_html_005ferrors_005f1
                                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005fhtml_005ferrors_005fproperty_005fnobody
                                    .reuse(_jspx_th_html_005ferrors_005f1);
                            return;
                        }
                        _005fjspx_005ftagPool_005fhtml_005ferrors_005fproperty_005fnobody
                                .reuse(_jspx_th_html_005ferrors_005f1);
                        out.write("\r\n");
                        out.write("    \t \t\r\n");
                        out.write("\t  </div>\r\n");
                        out.write("\t ");
                    }
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        out.write('\r');
        out.write('\n');
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        if (_jspxFactory != null)
            _jspxFactory.releasePageContext(_jspx_page_context);
    }
}