Example usage for javax.servlet.jsp JspWriter print

List of usage examples for javax.servlet.jsp JspWriter print

Introduction

In this page you can find the example usage for javax.servlet.jsp JspWriter print.

Prototype


abstract public void print(Object obj) throws IOException;

Source Link

Document

Print an object.

Usage

From source file:org.apache.jsp.application.configure_002dservice_002dprovider_jsp.java

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

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {//from   w w w .  j  a v  a  2  s  . co m
        response.setContentType("text/html");
        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;

        out.write("<!--\n");
        out.write("~ Copyright (c) 2005-2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n");
        out.write("~\n");
        out.write("~ WSO2 Inc. licenses this file to you under the Apache License,\n");
        out.write("~ Version 2.0 (the \"License\"); you may not use this file except\n");
        out.write("~ in compliance with the License.\n");
        out.write("~ You may obtain a copy of the License at\n");
        out.write("~\n");
        out.write("~    http://www.apache.org/licenses/LICENSE-2.0\n");
        out.write("~\n");
        out.write("~ Unless required by applicable law or agreed to in writing,\n");
        out.write("~ software distributed under the License is distributed on an\n");
        out.write("~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n");
        out.write("~ KIND, either express or implied.  See the License for the\n");
        out.write("~ specific language governing permissions and limitations\n");
        out.write("~ under the License.\n");
        out.write("-->\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<link href=\"css/idpmgt.css\" rel=\"stylesheet\" type=\"text/css\" media=\"all\"/>\n");
        //  carbon:breadcrumb
        org.wso2.carbon.ui.taglibs.Breadcrumb _jspx_th_carbon_005fbreadcrumb_005f0 = (org.wso2.carbon.ui.taglibs.Breadcrumb) _005fjspx_005ftagPool_005fcarbon_005fbreadcrumb_0026_005ftopPage_005fresourceBundle_005frequest_005flabel_005fnobody
                .get(org.wso2.carbon.ui.taglibs.Breadcrumb.class);
        _jspx_th_carbon_005fbreadcrumb_005f0.setPageContext(_jspx_page_context);
        _jspx_th_carbon_005fbreadcrumb_005f0.setParent(null);
        // /application/configure-service-provider.jsp(44,0) name = label type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0.setLabel("breadcrumb.service.provider");
        // /application/configure-service-provider.jsp(44,0) name = resourceBundle type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0
                .setResourceBundle("org.wso2.carbon.identity.application.mgt.ui.i18n.Resources");
        // /application/configure-service-provider.jsp(44,0) name = topPage type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0.setTopPage(true);
        // /application/configure-service-provider.jsp(44,0) name = request type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0.setRequest(request);
        int _jspx_eval_carbon_005fbreadcrumb_005f0 = _jspx_th_carbon_005fbreadcrumb_005f0.doStartTag();
        if (_jspx_th_carbon_005fbreadcrumb_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fcarbon_005fbreadcrumb_0026_005ftopPage_005fresourceBundle_005frequest_005flabel_005fnobody
                    .reuse(_jspx_th_carbon_005fbreadcrumb_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fcarbon_005fbreadcrumb_0026_005ftopPage_005fresourceBundle_005frequest_005flabel_005fnobody
                .reuse(_jspx_th_carbon_005fbreadcrumb_005f0);
        out.write('\n');
        org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../dialog/display_messages.jsp",
                out, false);
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<script type=\"text/javascript\" src=\"../admin/js/main.js\"></script>\n");
        out.write(
                "<script type=\"text/javascript\" src=\"../identity/validation/js/identity-validate.js\"></script>\n");
        out.write("\n");
        out.write("\n");

        ApplicationBean appBean = ApplicationMgtUIUtil.getApplicationBeanFromSession(session,
                request.getParameter("spName"));
        if (appBean.getServiceProvider() == null || appBean.getServiceProvider().getApplicationName() == null) {
            // if appbean is not set properly redirect the user to list-service-provider.jsp.

            out.write("\n");
            out.write("<script>\n");
            out.write("location.href = \"list-service-providers.jsp\";\n");
            out.write("</script>\n");

            return;
        }
        String spName = appBean.getServiceProvider().getApplicationName();

        List<String> permissions = null;
        permissions = appBean.getPermissions();

        String[] allClaimUris = appBean.getClaimUris();
        Map<String, String> claimMapping = appBean.getClaimMapping();
        Map<String, String> roleMapping = appBean.getRoleMapping();
        boolean isLocalClaimsSelected = appBean.isLocalClaimsSelected();
        String idPName = request.getParameter("idPName");
        String action = request.getParameter("action");
        String[] userStoreDomains = null;
        boolean isNeedToUpdate = false;

        String authTypeReq = request.getParameter("authType");
        if (authTypeReq != null && authTypeReq.trim().length() > 0) {
            appBean.setAuthenticationType(authTypeReq);
        }

        String samlIssuerName = request.getParameter("samlIssuer");

        if (samlIssuerName != null && "update".equals(action)) {
            appBean.setSAMLIssuer(samlIssuerName);
            isNeedToUpdate = true;
        }

        if (samlIssuerName != null && "delete".equals(action)) {
            appBean.deleteSAMLIssuer();
            isNeedToUpdate = true;
        }

        samlIssuerName = appBean.getSAMLIssuer();

        String kerberosServicePrinciple = request.getParameter("kerberos");

        if (kerberosServicePrinciple != null && "update".equals(action)) {
            appBean.setKerberosServiceName(kerberosServicePrinciple);
            isNeedToUpdate = true;
        }

        if (kerberosServicePrinciple != null && "delete".equals(action)) {
            appBean.deleteKerberosApp();
            isNeedToUpdate = true;
        }

        String attributeConsumingServiceIndex = request.getParameter("attrConServIndex");
        if (attributeConsumingServiceIndex != null) {
            appBean.setAttributeConsumingServiceIndex(attributeConsumingServiceIndex);
        }

        String oauthapp = request.getParameter("oauthapp");

        if (oauthapp != null && "update".equals(action)) {
            appBean.setOIDCAppName(oauthapp);
            isNeedToUpdate = true;
        }

        if (oauthapp != null && "delete".equals(action)) {
            appBean.deleteOauthApp();
            isNeedToUpdate = true;
        }

        String oauthConsumerSecret = null;

        if (session.getAttribute("oauth-consum-secret") != null && "update".equals(action)) {
            oauthConsumerSecret = (String) session.getAttribute("oauth-consum-secret");
            appBean.setOauthConsumerSecret(oauthConsumerSecret);
            session.removeAttribute("oauth-consum-secret");
        }

        oauthapp = appBean.getOIDCClientId();

        String wsTrust = request.getParameter("serviceName");

        if (wsTrust != null && "update".equals(action)) {
            appBean.setWstrustEp(wsTrust);
            isNeedToUpdate = true;
        }

        if (wsTrust != null && "delete".equals(action)) {
            appBean.deleteWstrustEp();
            isNeedToUpdate = true;
        }

        wsTrust = appBean.getWstrustSP();

        String display = request.getParameter("display");

        if (idPName != null && idPName.equals("")) {
            idPName = null;
        }

        if (ApplicationBean.AUTH_TYPE_FLOW.equals(authTypeReq) && "update".equals(action)) {
            isNeedToUpdate = true;
        }

        String authType = appBean.getAuthenticationType();

        StringBuffer localAuthTypes = new StringBuffer();
        String startOption = "<option value=\"";
        String middleOption = "\">";
        String endOPtion = "</option>";

        StringBuffer requestPathAuthTypes = new StringBuffer();
        RequestPathAuthenticatorConfig[] requestPathAuthenticators = appBean.getRequestPathAuthenticators();

        if (requestPathAuthenticators != null && requestPathAuthenticators.length > 0) {
            for (RequestPathAuthenticatorConfig reqAuth : requestPathAuthenticators) {
                requestPathAuthTypes.append(startOption + Encode.forHtmlAttribute(reqAuth.getName())
                        + middleOption + Encode.forHtmlContent(reqAuth.getDisplayName()) + endOPtion);
            }
        }

        Map<String, String> idpAuthenticators = new HashMap<String, String>();
        IdentityProvider[] federatedIdPs = appBean.getFederatedIdentityProviders();
        Map<String, String> proIdpConnector = new HashMap<String, String>();
        Map<String, String> enabledProIdpConnector = new HashMap<String, String>();
        Map<String, String> selectedProIdpConnectors = new HashMap<String, String>();
        Map<String, Boolean> idpStatus = new HashMap<String, Boolean>();
        Map<String, Boolean> IdpProConnectorsStatus = new HashMap<String, Boolean>();

        StringBuffer idpType = null;
        StringBuffer connType = null;
        StringBuffer enabledConnType = null;

        if (federatedIdPs != null && federatedIdPs.length > 0) {
            idpType = new StringBuffer();
            StringBuffer provisioningConnectors = null;
            for (IdentityProvider idp : federatedIdPs) {
                idpStatus.put(idp.getIdentityProviderName(), idp.getEnable());
                if (idp.getProvisioningConnectorConfigs() != null
                        && idp.getProvisioningConnectorConfigs().length > 0) {
                    ProvisioningConnectorConfig[] connectors = idp.getProvisioningConnectorConfigs();
                    int i = 1;
                    connType = new StringBuffer();
                    enabledConnType = new StringBuffer();
                    provisioningConnectors = new StringBuffer();
                    for (ProvisioningConnectorConfig proConnector : connectors) {
                        if (i == connectors.length) {
                            provisioningConnectors
                                    .append(proConnector.getEnabled() ? proConnector.getName() : "");
                        } else {
                            provisioningConnectors
                                    .append(proConnector.getEnabled() ? proConnector.getName() + "," : "");
                        }
                        connType.append(startOption + Encode.forHtmlAttribute(proConnector.getName())
                                + middleOption + Encode.forHtmlContent(proConnector.getName()) + endOPtion);
                        if (proConnector.getEnabled()) {
                            enabledConnType.append(startOption + Encode.forHtmlAttribute(proConnector.getName())
                                    + middleOption + Encode.forHtmlContent(proConnector.getName()) + endOPtion);
                        }
                        IdpProConnectorsStatus.put(idp.getIdentityProviderName() + "_" + proConnector.getName(),
                                proConnector.getEnabled());
                        i++;
                    }
                    proIdpConnector.put(idp.getIdentityProviderName(), connType.toString());
                    if (idp.getEnable()) {
                        enabledProIdpConnector.put(idp.getIdentityProviderName(), enabledConnType.toString());
                        idpType.append(startOption + Encode.forHtmlAttribute(idp.getIdentityProviderName())
                                + "\" data=\"" + Encode.forHtmlAttribute(provisioningConnectors.toString())
                                + "\" >" + Encode.forHtmlContent(idp.getIdentityProviderName()) + endOPtion);
                    }
                }
            }

            if (appBean.getServiceProvider().getOutboundProvisioningConfig() != null
                    && appBean.getServiceProvider().getOutboundProvisioningConfig()
                            .getProvisioningIdentityProviders() != null
                    && appBean.getServiceProvider().getOutboundProvisioningConfig()
                            .getProvisioningIdentityProviders().length > 0) {

                IdentityProvider[] proIdps = appBean.getServiceProvider().getOutboundProvisioningConfig()
                        .getProvisioningIdentityProviders();
                for (IdentityProvider idp : proIdps) {
                    ProvisioningConnectorConfig proIdp = idp.getDefaultProvisioningConnectorConfig();
                    String options = proIdpConnector.get(idp.getIdentityProviderName());
                    if (proIdp != null && options != null) {
                        String oldOption = startOption + Encode.forHtmlAttribute(proIdp.getName())
                                + middleOption + Encode.forHtmlContent(proIdp.getName()) + endOPtion;
                        String newOption = startOption + Encode.forHtmlAttribute(proIdp.getName())
                                + "\" selected=\"selected" + middleOption
                                + Encode.forHtmlContent(proIdp.getName()) + endOPtion;
                        if (options.contains(oldOption)) {
                            options = options.replace(oldOption, newOption);
                        } else {
                            options = options + newOption;
                        }
                        selectedProIdpConnectors.put(idp.getIdentityProviderName(), options);
                    } else {
                        options = enabledProIdpConnector.get(idp.getIdentityProviderName());
                        selectedProIdpConnectors.put(idp.getIdentityProviderName(), options);
                    }

                }
            }

        }
        try {
            String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
            String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
            ConfigurationContext configContext = (ConfigurationContext) config.getServletContext()
                    .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
            ApplicationManagementServiceClient serviceClient = new ApplicationManagementServiceClient(cookie,
                    backendServerURL, configContext);
            userStoreDomains = serviceClient.getUserStoreDomains();
        } catch (Exception e) {
            CarbonUIMessage.sendCarbonUIMessage("Error occured while loading User Store Domail",
                    CarbonUIMessage.ERROR, request, e);
        }

        out.write("\n");
        out.write("\n");
        out.write("<script>\n");
        out.write("\n");
        out.write("\n");
        if (claimMapping != null) {
            out.write("\n");
            out.write("var claimMappinRowID = ");
            out.print(claimMapping.size() - 1);
            out.write(';');
            out.write('\n');
        } else {
            out.write("\n");
            out.write("var claimMappinRowID = -1;\n");
        }
        out.write("\n");
        out.write("\n");
        out.write("var reqPathAuth = 0;\n");
        out.write("\n");
        if (appBean.getServiceProvider().getRequestPathAuthenticatorConfigs() != null) {
            out.write("\n");
            out.write("var reqPathAuth = ");
            out.print(appBean.getServiceProvider().getRequestPathAuthenticatorConfigs().length);
            out.write(';');
            out.write('\n');
        } else {
            out.write("\n");
            out.write("var reqPathAuth = 0;\n");
        }
        out.write('\n');
        out.write('\n');
        if (roleMapping != null) {
            out.write("\n");
            out.write("var roleMappinRowID = ");
            out.print(roleMapping.size() - 1);
            out.write(';');
            out.write('\n');
        } else {
            out.write("\n");
            out.write("var roleMappinRowID = -1;\n");
        }
        out.write("\n");
        out.write("\n");
        out.write("\tfunction createAppOnclick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"spName\").value;\n");
        out.write("\t\tif( spName == '') {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f0(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tlocation.href = '#';\n");
        out.write("\t\t} else if (!validateTextForIllegal(document.getElementById(\"spName\"))) {\n");
        out.write("                        return false;\n");
        out.write("                } else {\n");
        out.write("\t\t\tif($('input:radio[name=claim_dialect]:checked').val() == \"custom\")\n");
        out.write("\t\t\t{\n");
        out.write("\t\t\t\tvar isValied = true;\n");
        out.write("\t\t\t\t$.each($('.spClaimVal'), function(){\n");
        out.write("\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\tisValied = false;\n");
        out.write("\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Claim Configuration section');\n");
        out.write("\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t});\n");
        out.write("\t\t\t\tif(!isValied){\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t}\n");
        out.write("\t\t\t// number_of_claimmappings\n");
        out.write(
                "\t\t\tvar numberOfClaimMappings = document.getElementById(\"claimMappingAddTable\").rows.length;\n");
        out.write("\t\t\tdocument.getElementById('number_of_claimmappings').value=numberOfClaimMappings;\n");
        out.write("\t\t\t\n");
        out.write("\t\t\tif($('[name=app_permission]').length > 0){\n");
        out.write("\t\t\t\tvar isValied = true;\n");
        out.write("\t\t\t\t$.each($('[name=app_permission]'), function(){\n");
        out.write("\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\tisValied = false;\n");
        out.write(
                "\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Permission Configuration section');\n");
        out.write("\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t});\n");
        out.write("\t\t\t\tif(!isValied){\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t}\n");
        out.write("\t\t\tif($('.roleMapIdp').length > 0){\n");
        out.write("\t\t\t\tvar isValied = true;\n");
        out.write("\t\t\t\t$.each($('.roleMapIdp'), function(){\n");
        out.write("\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\tisValied = false;\n");
        out.write(
                "\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Role Mapping Configuration section');\n");
        out.write("\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t});\n");
        out.write("\t\t\t\tif(isValied){\n");
        out.write("\t\t\t\t\tif($('.roleMapSp').length > 0){\n");
        out.write("\t\t\t\t\t\t$.each($('.roleMapSp'), function(){\n");
        out.write("\t\t\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\t\t\tisValied = false;\n");
        out.write(
                "\t\t\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Role Mapping Configuration section');\n");
        out.write("\t\t\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t\t\t});\n");
        out.write("\t\t\t\t\t}\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t\tif(!isValied){\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t}\n");
        out.write(
                "\t\t\tvar numberOfPermissions = document.getElementById(\"permissionAddTable\").rows.length;\n");
        out.write("\t\t\tdocument.getElementById('number_of_permissions').value=numberOfPermissions;\n");
        out.write("\t\t\t\n");
        out.write(
                "\t\t\tvar numberOfRoleMappings = document.getElementById(\"roleMappingAddTable\").rows.length;\n");
        out.write("\t\t\tdocument.getElementById('number_of_rolemappings').value=numberOfRoleMappings;\n");
        out.write("\n");
        out.write("\t\t\tdocument.getElementById(\"configure-sp-form\").submit();\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction updateBeanAndRedirect(redirectURL){\n");
        out.write(
                "\t\tvar numberOfClaimMappings = document.getElementById(\"claimMappingAddTable\").rows.length;\n");
        out.write("\t\tdocument.getElementById('number_of_claimmappings').value=numberOfClaimMappings;\n");
        out.write("\t\t\n");
        out.write(
                "\t\tvar numberOfPermissions = document.getElementById(\"permissionAddTable\").rows.length;\n");
        out.write("\t\tdocument.getElementById('number_of_permissions').value=numberOfPermissions;\n");
        out.write("\t\t\n");
        out.write(
                "\t\tvar numberOfRoleMappings = document.getElementById(\"roleMappingAddTable\").rows.length;\n");
        out.write("\t\tdocument.getElementById('number_of_rolemappings').value=numberOfRoleMappings;\n");
        out.write("\t\t\n");
        out.write("\t\t$.ajax({\n");
        out.write("\t\t    type: \"POST\",\n");
        out.write("\t\t\turl: 'update-application-bean.jsp?spName=");
        out.print(Encode.forUriComponent(spName));
        out.write("',\n");
        out.write("\t\t    data: $(\"#configure-sp-form\").serialize(),\n");
        out.write("\t\t    success: function(){\n");
        out.write("\t\t    \tlocation.href=redirectURL;\n");
        out.write("\t\t    }\n");
        out.write("\t\t});\n");
        out.write("\t}\n");
        out.write("\n");
        out.write("    function onSamlSsoClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../sso-saml/add_service_provider.jsp?spName=\"+spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f1(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"saml_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\n");
        out.write("\tfunction onKerberosClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../servicestore/add-step1.jsp?spName=\"+spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f2(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"kerberos_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\n");
        out.write("\tfunction onOauthClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../oauth/add.jsp?spName=\" + spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f3(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"oauth_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction onSTSClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../generic-sts/sts.jsp?spName=\" + spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f4(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"sts_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction deleteReqPathRow(obj){\n");
        out.write("    \treqPathAuth--;\n");
        out.write("        jQuery(obj).parent().parent().remove();\n");
        out.write("        if($(jQuery('#permissionAddTable tr')).length == 1){\n");
        out.write("            $(jQuery('#permissionAddTable')).toggle();\n");
        out.write("        }\n");
        out.write("    }\n");
        out.write("\t\n");
        out.write("\tfunction onAdvanceAuthClick() {\n");
        out.write("\t\tlocation.href='configure-authentication-flow.jsp?spName=");
        out.print(Encode.forUriComponent(spName));
        out.write("';\n");
        out.write("\t}\n");
        out.write("    \n");
        out.write("    jQuery(document).ready(function(){\n");
        out.write("        jQuery('#authenticationConfRow').hide();\n");
        out.write("        jQuery('#outboundProvisioning').hide();\n");
        out.write("        jQuery('#inboundProvisioning').hide();  \n");
        out.write("        jQuery('#ReqPathAuth').hide();        \n");
        out.write("        jQuery('#permissionConfRow').hide();\n");
        out.write("        jQuery('#claimsConfRow').hide();\n");
        out.write("        jQuery('h2.trigger').click(function(){\n");
        out.write("            if (jQuery(this).next().is(\":visible\")) {\n");
        out.write("                this.className = \"active trigger\";\n");
        out.write("            } else {\n");
        out.write("                this.className = \"trigger\";\n");
        out.write("            }\n");
        out.write("            jQuery(this).next().slideToggle(\"fast\");\n");
        out.write("            return false; //Prevent the browser jump to the link anchor\n");
        out.write("        });\n");
        out.write("        jQuery('#permissionAddLink').click(function(){\n");
        out.write(
                "            jQuery('#permissionAddTable').append(jQuery('<tr><td class=\"leftCol-big\"><input style=\"width: 98%;\" type=\"text\" id=\"app_permission\" name=\"app_permission\"/></td>' +\n");
        out.write("                    '<td><a onclick=\"deletePermissionRow(this)\" class=\"icon-link\" '+\n");
        out.write("                    'style=\"background-image: url(images/delete.gif)\">'+\n");
        out.write("                    'Delete'+\n");
        out.write("                    '</a></td></tr>'));\n");
        out.write("        });\n");
        out.write("        jQuery('#claimMappingAddLink').click(function(){\n");
        out.write("        \t$('#claimMappingAddTable').show();\n");
        out.write("        \tvar selectedIDPClaimName = $('select[name=idpClaimsList]').val();\n");
        out.write("    \t\tif(!validaForDuplications('.idpClaim', selectedIDPClaimName, 'Local Claim')){\n");
        out.write("    \t\t\treturn false;\n");
        out.write("    \t\t}\n");
        out.write("        \tclaimMappinRowID++;\n");
        out.write("    \t\tvar idpClaimListDiv = $('#localClaimsList').clone();\n");
        out.write("    \t\tif(idpClaimListDiv.length > 0){\n");
        out.write("    \t\t\t$(idpClaimListDiv.find('select')).attr('id','idpClaim_'+ claimMappinRowID);\n");
        out.write("    \t\t\t$(idpClaimListDiv.find('select')).attr('name','idpClaim_'+ claimMappinRowID);\n");
        out.write("    \t\t\t$(idpClaimListDiv.find('select')).addClass( \"idpClaim\" );\n");
        out.write("    \t\t}\n");
        out.write("        \tif($('input:radio[name=claim_dialect]:checked').val() == \"local\")\n");
        out.write("        \t{\n");
        out.write("        \t\t$('.spClaimHeaders').hide();\n");
        out.write("        \t\t$('#roleMappingSelection').hide();\n");
        out.write("            \tjQuery('#claimMappingAddTable').append(jQuery('<tr>'+\n");
        out.write(
                "                        '<td style=\"display:none;\"><input type=\"text\" style=\"width: 98%;\" id=\"spClaim_' + claimMappinRowID + '\" name=\"spClaim_' + claimMappinRowID + '\"/></td> '+\n");
        out.write("            \t        '<td>'+idpClaimListDiv.html()+'</td>' +                        \n");
        out.write(
                "                        '<td style=\"display:none;\"><input type=\"checkbox\"  name=\"spClaim_req_' + claimMappinRowID + '\"  id=\"spClaim_req_' + claimMappinRowID + '\" checked/></td>' + \n");
        out.write(
                "                        '<td><a onclick=\"deleteClaimRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete</a></td>' + \n");
        out.write("                        '</tr>'));\n");
        out.write("        \t}\n");
        out.write("        \telse {\n");
        out.write("        \t\t$('.spClaimHeaders').show();\n");
        out.write("        \t\t$('#roleMappingSelection').show();\n");
        out.write("            \tjQuery('#claimMappingAddTable').append(jQuery('<tr>'+\n");
        out.write(
                "                        '<td><input type=\"text\" class=\"spClaimVal\" style=\"width: 98%;\" id=\"spClaim_' + claimMappinRowID + '\" name=\"spClaim_' + claimMappinRowID + '\"/></td> '+\n");
        out.write("                        '<td>'+idpClaimListDiv.html()+'</td>' +\n");
        out.write(
                "                        '<td><input type=\"checkbox\"  name=\"spClaim_req_' + claimMappinRowID + '\"  id=\"spClaim_req_' + claimMappinRowID + '\"/></td>' + \n");
        out.write(
                "                        '<td><a onclick=\"deleteClaimRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete</a></td>' + \n");
        out.write("                        '</tr>'));\n");
        out.write("            \t$('#spClaim_' + claimMappinRowID).change(function(){\n");
        out.write("            \t\tresetRoleClaims();\n");
        out.write("            \t});\n");
        out.write("        \t}\n");
        out.write("\n");
        out.write("        });\n");
        out.write("        jQuery('#roleMappingAddLink').click(function(){\n");
        out.write("        \troleMappinRowID++;\n");
        out.write("        \t$('#roleMappingAddTable').show();\n");
        out.write(
                "        \tjQuery('#roleMappingAddTable').append(jQuery('<tr><td><input style=\"width: 98%;\" class=\"roleMapIdp\" type=\"text\" id=\"idpRole_'+ roleMappinRowID +'\" name=\"idpRole_'+ roleMappinRowID +'\"/></td>' +\n");
        out.write(
                "                    '<td><input style=\"width: 98%;\" class=\"roleMapSp\" type=\"text\" id=\"spRole_' + roleMappinRowID + '\" name=\"spRole_' + roleMappinRowID + '\"/></td> '+\n");
        out.write(
                "                    '<td><a onclick=\"deleteRoleMappingRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete</a>' + \n");
        out.write("                    '</td></tr>'));\n");
        out.write("        })\n");
        out.write("         jQuery('#reqPathAuthenticatorAddLink').click(function(){\n");
        out.write("        \treqPathAuth++;\n");
        out.write("    \t\tvar selectedRePathAuthenticator =jQuery(this).parent().children()[0].value;\n");
        out.write(
                "    \t\tif(!validaForDuplications('[name=req_path_auth]', selectedRePathAuthenticator, \"Configuration\")){\n");
        out.write("    \t\t\treturn false;\n");
        out.write("    \t\t}\n");
        out.write("    \t\t\n");
        out.write("    \t\tjQuery(this)\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.append(\n");
        out.write(
                "    \t\t\t\t\t\tjQuery('<tr><td><input name=\"req_path_auth' + '\" id=\"req_path_auth\" type=\"hidden\" value=\"' + selectedRePathAuthenticator + '\" />'+ selectedRePathAuthenticator +'</td><td class=\"leftCol-small\" ><a onclick=\"deleteReqPathRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a></td></tr>'));\n");
        out.write("    \t\t\n");
        out.write("        });\n");
        out.write("        \n");
        out.write("        $(\"[name=claim_dialect]\").click(function(){\n");
        out.write("        \t\tvar element = $(this);\n");
        out.write("        \t\tclaimMappinRowID = -1;\n");
        out.write("        \t\t\n");
        out.write("        \t\tif($('.idpClaim').length > 0){\n");
        out.write(
                "                    CARBON.showConfirmationDialog('Changing dialect will delete all claim mappings. Do you want to proceed?',\n");
        out.write("                            function (){\n");
        out.write("                    \t\t\t$.each($('.idpClaim'), function(){\n");
        out.write("                    \t\t    \t$(this).parent().parent().remove();\n");
        out.write("                    \t\t\t});\n");
        out.write("                    \t\t\t$('#claimMappingAddTable').hide();\n");
        out.write("                    \t\t\tchangeDialectUIs(element);\n");
        out.write("                           \t},\n");
        out.write("                    \t\tfunction(){\n");
        out.write("                           \t\t//Reset checkboxes\n");
        out.write(
                "                           \t\t$('#claim_dialect_wso2').attr('checked', (element.val() == 'custom'));\n");
        out.write(
                "                           \t\t$('#claim_dialect_custom').attr('checked', (element.val() == 'local'));\n");
        out.write("                           \t});\n");
        out.write("        \t\t}else{\n");
        out.write("        \t\t\t$('#claimMappingAddTable').hide();\n");
        out.write("        \t\t\tchangeDialectUIs(element);\n");
        out.write("        \t\t}\n");
        out.write("        });\n");
        out.write("        \n");
        out.write("        if($('#isNeedToUpdate').val() == 'true'){\n");
        out.write("        \t$('#isNeedToUpdate').val('false');\n");
        out.write(
                "    \t\tvar numberOfClaimMappings = document.getElementById(\"claimMappingAddTable\").rows.length;\n");
        out.write("    \t\tdocument.getElementById('number_of_claimmappings').value=numberOfClaimMappings;\n");
        out.write("    \t\t\n");
        out.write(
                "    \t\tvar numberOfPermissions = document.getElementById(\"permissionAddTable\").rows.length;\n");
        out.write("    \t\tdocument.getElementById('number_of_permissions').value=numberOfPermissions;\n");
        out.write("    \t\t\n");
        out.write(
                "    \t\tvar numberOfRoleMappings = document.getElementById(\"roleMappingAddTable\").rows.length;\n");
        out.write("    \t\tdocument.getElementById('number_of_rolemappings').value=numberOfRoleMappings;\n");
        out.write("    \t\t\n");
        out.write("    \t\t$.ajax({\n");
        out.write("    \t\t    type: \"POST\",\n");
        out.write("    \t\t\turl: 'configure-service-provider-update.jsp?spName=");
        out.print(Encode.forUriComponent(spName));
        out.write("',\n");
        out.write("    \t\t    data: $(\"#configure-sp-form\").serialize()\n");
        out.write("    \t\t});\n");
        out.write("        }\n");
        out.write("    });\n");
        out.write("    \n");
        out.write("    function resetRoleClaims(){\n");
        out.write("\t    $(\"#roleClaim option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    $(\"#subject_claim_uri option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    $.each($('.spClaimVal'), function(){\n");
        out.write("\t    \tif($(this).val().length > 0){\n");
        out.write(
                "\t\t    \t$(\"#roleClaim\").append('<option value=\"'+$(this).val()+'\">'+$(this).val()+'</option>');\n");
        out.write(
                "\t\t    \t$('#subject_claim_uri').append('<option value=\"'+$(this).val()+'\">'+$(this).val()+'</option>');\n");
        out.write("\t    \t}\n");
        out.write("\t    });\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function changeDialectUIs(element){\n");
        out.write("\t    $(\"#roleClaim option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    \n");
        out.write("\t    $(\"#subject_claim_uri option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    \n");
        out.write("\t\tif(element.val() == 'local'){\n");
        out.write("\t\t\t$('#addClaimUrisLbl').text('Requested Claims:');\n");
        out.write("\t\t\t$('#roleMappingSelection').hide();\n");
        out.write("\t\t\tif($('#local_calim_uris').length > 0 && $('#local_calim_uris').val().length > 0){\n");
        out.write("\t\t\t\tvar dataArray = $('#local_calim_uris').val().split(',');\n");
        out.write("\t\t\t\tif(dataArray.length > 0){\n");
        out.write("\t\t\t\t\tvar optionsList = \"\";\n");
        out.write("\t\t\t\t\t$.each(dataArray, function(){\n");
        out.write("\t\t\t\t\t\tif(this.length > 0){\n");
        out.write("\t\t\t\t\t\t\toptionsList += '<option value='+this+'>'+this+'</option>'\n");
        out.write("\t\t\t\t\t\t}\n");
        out.write("\t\t\t\t\t});\n");
        out.write("\t\t\t\t\tif(optionsList.length > 0){\n");
        out.write("\t\t\t\t\t\t$('#subject_claim_uri').append(optionsList);\n");
        out.write("\t\t\t\t\t}\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t} \n");
        out.write("\t\t}else{\n");
        out.write("\t\t\t$('#addClaimUrisLbl').text('Identity Provider Claim URIs:');\n");
        out.write("\t\t\t$('#roleMappingSelection').show();\n");
        out.write("\t\t}\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function deleteClaimRow(obj){\n");
        out.write("    \tif($('input:radio[name=claim_dialect]:checked').val() == \"custom\"){\n");
        out.write("    \t\tif($(obj).parent().parent().find('input.spClaimVal').val().length > 0){\n");
        out.write(
                "    \t\t\t$('#roleClaim option[value=\"'+$(obj).parent().parent().find('input.spClaimVal').val()+'\"]').remove();\n");
        out.write(
                "    \t\t\t$('#subject_claim_uri option[value=\"'+$(obj).parent().parent().find('input.spClaimVal').val()+'\"]').remove();\n");
        out.write("    \t\t}\n");
        out.write("    \t}\n");
        out.write("    \t\n");
        out.write("    \tjQuery(obj).parent().parent().remove();\n");
        out.write("\t\tif($('.idpClaim').length == 0){\n");
        out.write("\t\t\t$('#claimMappingAddTable').hide();\n");
        out.write("\t\t}\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function deleteRoleMappingRow(obj){\n");
        out.write("    \tjQuery(obj).parent().parent().remove();\n");
        out.write("    \tif($('.roleMapIdp').length == 0){\n");
        out.write("    \t\t$('#roleMappingAddTable').hide();\n");
        out.write("    \t}\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function deletePermissionRow(obj){\n");
        out.write("    \tjQuery(obj).parent().parent().remove();\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    var deletePermissionRows = [];\n");
        out.write("    function deletePermissionRowOld(obj){\n");
        out.write("        if(jQuery(obj).parent().prev().children()[0].value != ''){\n");
        out.write("        \tdeletePermissionRows.push(jQuery(obj).parent().prev().children()[0].value);\n");
        out.write("        }\n");
        out.write("        jQuery(obj).parent().parent().remove();\n");
        out.write("        if($(jQuery('#permissionAddTable tr')).length == 1){\n");
        out.write("            $(jQuery('#permissionAddTable')).toggle();\n");
        out.write("        }\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function addIDPRow(obj) {\n");
        out.write("\t\tvar selectedObj = jQuery(obj).prev().find(\":selected\");\n");
        out.write("\n");
        out.write("\t\tvar selectedIDPName = selectedObj.val(); \n");
        out.write(
                "\t\tif(!validaForDuplications('[name=provisioning_idp]', selectedIDPName, 'Configuration')){\n");
        out.write("\t\t\treturn false;\n");
        out.write("\t\t}\n");
        out.write("\n");
        out.write("\t\t//var stepID = jQuery(obj).parent().children()[1].value;\n");
        out.write("\t\tvar dataArray =  selectedObj.attr('data').split(',');\n");
        out.write(
                "\t\tvar newRow = '<tr><td><input name=\"provisioning_idp\" id=\"\" type=\"hidden\" value=\"' + selectedIDPName + '\" />' + selectedIDPName + ' </td><td> <select name=\"provisioning_con_idp_' + selectedIDPName + '\" style=\"float: left; min-width: 150px;font-size:13px;\">';\n");
        out.write("\t\tfor(var i=0;i<dataArray.length;i++){\n");
        out.write("\t\t\tif(dataArray[i].length > 0){\n");
        out.write("\t\t\t\tnewRow+='<option>'+dataArray[i]+'</option>';\t\t\t\t\t\n");
        out.write("\t\t\t}\n");
        out.write("\t\t}\n");
        out.write(
                "\t\tnewRow+='</select></td><td><input type=\"checkbox\" name=\"blocking_prov_' + selectedIDPName +\n");
        out.write(
                "\t\t\t\t'\"  />Blocking</td><td><input type=\"checkbox\" name=\"provisioning_jit_' + selectedIDPName +\n");
        out.write(
                "\t\t\t\t'\"  />JIT Outbound</td><td class=\"leftCol-small\" ><a onclick=\"deleteIDPRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a></td></tr>';\n");
        out.write("\t\tjQuery(obj)\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.append(\n");
        out.write("\t\t\t\t\t\tjQuery(newRow));\t\n");
        out.write("\t\t}\t\n");
        out.write("    \n");
        out.write("    function deleteIDPRow(obj){\n");
        out.write("        jQuery(obj).parent().parent().remove();\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("\tfunction validaForDuplications(selector, authenticatorName, type){\n");
        out.write("\t\tif($(selector).length > 0){\n");
        out.write("\t\t\tvar isNew = true;\n");
        out.write("\t\t\t$.each($(selector),function(){\n");
        out.write("\t\t\t\tif($(this).val() == authenticatorName){\n");
        out.write("\t\t\t\t\tCARBON.showWarningDialog(type+' \"'+authenticatorName+'\" is already added');\n");
        out.write("\t\t\t\t\tisNew = false;\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t});\n");
        out.write("\t\t\tif(!isNew){\n");
        out.write("\t\t\t\treturn false;\n");
        out.write("\t\t\t}\n");
        out.write("\t\t}\n");
        out.write("\t\treturn true;\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction showHidePassword(element, inputId){\n");
        out.write("\t\tif($(element).text()=='Show'){\n");
        out.write("\t\t\tdocument.getElementById(inputId).type = 'text';\n");
        out.write("\t\t\t$(element).text('Hide');\n");
        out.write("\t\t}else{\n");
        out.write("\t\t\tdocument.getElementById(inputId).type = 'password';\n");
        out.write("\t\t\t$(element).text('Show');\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("    \n");
        out.write("    function disable() {\n");
        out.write(
                "        document.getElementById(\"scim-inbound-userstore\").disabled =!document.getElementById(\"scim-inbound-userstore\").disabled;\n");
        out.write(
                "        document.getElementById(\"dumb\").value = document.getElementById(\"scim-inbound-userstore\").disabled;\n");
        out.write("    }\n");
        out.write("\n");
        out.write("    function validateTextForIllegal(fld) {\n");
        out.write(
                "        var isValid = doValidateInput(fld, \"Provided Service Provider name is invalid.\");\n");
        out.write("        if (isValid) {\n");
        out.write("            return true;\n");
        out.write("        } else {\n");
        out.write("            return false;\n");
        out.write("        }\n");
        out.write("    }\n");
        out.write("</script>\n");
        out.write("\n");
        //  fmt:bundle
        org.apache.taglibs.standard.tag.rt.fmt.BundleTag _jspx_th_fmt_005fbundle_005f0 = (org.apache.taglibs.standard.tag.rt.fmt.BundleTag) _005fjspx_005ftagPool_005ffmt_005fbundle_0026_005fbasename
                .get(org.apache.taglibs.standard.tag.rt.fmt.BundleTag.class);
        _jspx_th_fmt_005fbundle_005f0.setPageContext(_jspx_page_context);
        _jspx_th_fmt_005fbundle_005f0.setParent(null);
        // /application/configure-service-provider.jsp(718,0) name = basename type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_fmt_005fbundle_005f0.setBasename("org.wso2.carbon.identity.application.mgt.ui.i18n.Resources");
        int _jspx_eval_fmt_005fbundle_005f0 = _jspx_th_fmt_005fbundle_005f0.doStartTag();
        if (_jspx_eval_fmt_005fbundle_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_fmt_005fbundle_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.pushBody();
                _jspx_th_fmt_005fbundle_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                _jspx_th_fmt_005fbundle_005f0.doInitBody();
            }
            do {
                out.write("\n");
                out.write("    <div id=\"middle\">\n");
                out.write("        <h2>\n");
                out.write("            ");
                if (_jspx_meth_fmt_005fmessage_005f5(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("        </h2>\n");
                out.write("        <div id=\"workArea\">\n");
                out.write(
                        "            <form id=\"configure-sp-form\" method=\"post\" name=\"configure-sp-form\" method=\"post\" action=\"configure-service-provider-finish.jsp\" >\n");
                out.write("            <input type=\"hidden\" name=\"oldSPName\" id=\"oldSPName\" value=\"");
                out.print(Encode.forHtmlAttribute(spName));
                out.write("\"/>\n");
                out.write("            <input type=\"hidden\" id=\"isNeedToUpdate\" value=\"");
                out.print(isNeedToUpdate);
                out.write("\"/>\n");
                out.write("            <div class=\"sectionSeperator togglebleTitle\">");
                if (_jspx_meth_fmt_005fmessage_005f6(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</div>\n");
                out.write("            <div class=\"sectionSub\">\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                    <tr>\n");
                out.write("                        <td style=\"width:15%\" class=\"leftCol-med labelField\">");
                if (_jspx_meth_fmt_005fmessage_005f7(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":<span class=\"required\">*</span></td>\n");
                out.write("                        <td>\n");
                out.write(
                        "                            <input style=\"width:50%\" id=\"spName\" name=\"spName\" type=\"text\" value=\"");
                out.print(Encode.forHtmlAttribute(spName));
                out.write("\" white-list-patterns=\"^[a-zA-Z0-9._|-]*$\" autofocus/>\n");
                out.write("                            <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f8(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    <tr>\n");
                out.write(
                        "                       <td style=\"width:15%\" class=\"leftCol-med labelField\">Description:</td>                   \n");
                out.write("                     <td>\n");
                out.write(
                        "                        <textarea style=\"width:50%\" type=\"text\" name=\"sp-description\" id=\"sp-description\" class=\"text-box-big\">");
                out.print(appBean.getServiceProvider().getDescription() != null
                        ? Encode.forHtmlContent(appBean.getServiceProvider().getDescription())
                        : "");
                out.write("</textarea>\n");
                out.write("                        <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f9(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    <tr>\n");
                out.write("                    \t<td class=\"leftCol-med\">\n");
                out.write("                             <label for=\"isSaasApp\">");
                if (_jspx_meth_fmt_005fmessage_005f10(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                        </td>\n");
                out.write("                        <td>\n");
                out.write("                            <div class=\"sectionCheckbox\">\n");
                out.write(
                        "                                <input type=\"checkbox\"  id=\"isSaasApp\" name=\"isSaasApp\" ");
                out.print(appBean.getServiceProvider().getSaasApp() ? "checked" : "");
                out.write("/>\n");
                out.write(
                        "                                <span style=\"display:inline-block\" class=\"sectionHelp\">\n");
                out.write("                                    ");
                if (_jspx_meth_fmt_005fmessage_005f11(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                                </span>\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                </table>\n");
                out.write("            </div>\n");
                out.write("\n");
                out.write("\t\t\t<h2 id=\"claims_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f12(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"claimsConfRow\">\n");
                out.write(
                        "                   <table style=\"padding-top: 5px; padding-bottom: 10px;\" class=\"carbonFormTable\">\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\">\n");
                out.write("                    \t\t\t");
                if (_jspx_meth_fmt_005fmessage_005f13(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                    \t\t\t<input type=\"radio\" id=\"claim_dialect_wso2\" name=\"claim_dialect\" value=\"local\" ");
                out.print(isLocalClaimsSelected ? "checked" : "");
                out.write("><label for=\"claim_dialect_wso2\" style=\"cursor: pointer;\">");
                if (_jspx_meth_fmt_005fmessage_005f14(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                \t\t<tr>\n");
                out.write(
                        "                \t\t    <td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("                    \t\t</td>\n");
                out.write("                \t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                    \t\t\t<input type=\"radio\" id=\"claim_dialect_custom\" name=\"claim_dialect\" value=\"custom\" ");
                out.print(!isLocalClaimsSelected ? "checked" : "");
                out.write("><label for=\"claim_dialect_custom\" style=\"cursor: pointer;\">");
                if (_jspx_meth_fmt_005fmessage_005f15(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    </table>\n");
                out.write("                    <table  class=\"carbonFormTable\">\n");
                out.write("\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t<td class=\"leftCol-med labelField\" style=\"width:15%\">\n");
                out.write("\t\t\t\t\t\t\t<label id=\"addClaimUrisLbl\">");
                out.print(isLocalClaimsSelected ? "Requested Claims:" : "Identity Provider Claim URIs:");
                out.write("</label>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "\t\t\t\t\t\t\t<a id=\"claimMappingAddLink\" class=\"icon-link\" style=\"background-image: url(images/add.gif); margin-top: 0px !important; margin-bottom: 5px !important; margin-left: 5px;\">");
                if (_jspx_meth_fmt_005fmessage_005f16(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write(
                        "                            <table class=\"styledLeft\" id=\"claimMappingAddTable\" style=\"");
                out.print(claimMapping == null || claimMapping.isEmpty() ? "display:none" : "");
                out.write("\">\n");
                out.write("                              <thead><tr>\n");
                out.write("                              <th class=\"leftCol-big spClaimHeaders\" style=\"");
                out.print(isLocalClaimsSelected ? "display:none;" : "");
                out.write('"');
                out.write('>');
                if (_jspx_meth_fmt_005fmessage_005f17(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th>\n");
                out.write("                              <th class=\"leftCol-big\">");
                if (_jspx_meth_fmt_005fmessage_005f18(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th>\n");
                out.write("                              <th class=\"leftCol-mid spClaimHeaders\" style=\"");
                out.print(isLocalClaimsSelected ? "display:none;" : "");
                out.write('"');
                out.write('>');
                if (_jspx_meth_fmt_005fmessage_005f19(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th>\n");
                out.write("                              \n");
                out.write("                              <th>");
                if (_jspx_meth_fmt_005fmessage_005f20(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th></tr></thead>\n");
                out.write("                              <tbody>\n");
                out.write("                              ");
                if (claimMapping != null && !claimMapping.isEmpty()) {
                    out.write("\n");
                    out.write("                          \n");
                    out.write("                               ");

                    int i = -1;
                    for (Map.Entry<String, String> entry : claimMapping.entrySet()) {
                        i++;

                        out.write("\n");
                        out.write("                               <tr>\n");
                        out.write("                                   <td style=\"");
                        out.print(isLocalClaimsSelected ? "display:none;" : "");
                        out.write(
                                "\"><input type=\"text\" class=\"spClaimVal\" style=\"width: 98%;\" value=\"");
                        out.print(Encode.forHtmlAttribute(entry.getValue()));
                        out.write("\" id=\"spClaim_");
                        out.print(i);
                        out.write("\" name=\"spClaim_");
                        out.print(i);
                        out.write("\" readonly=\"readonly\"/></td>\n");
                        out.write("                               \t<td>\n");
                        out.write("\t\t\t\t\t\t\t\t\t<select id=\"idpClaim_");
                        out.print(i);
                        out.write("\" name=\"idpClaim_");
                        out.print(i);
                        out.write("\" class=\"idpClaim\" style=\"float:left; width: 100%\">\t\t\t\t\t\t\n");
                        out.write("\t\t\t\t\t\t\t\t\t\t");
                        String[] localClaims = appBean.getClaimUris();
                        for (String localClaimName : localClaims) {
                            if (localClaimName.equals(entry.getKey())) {
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(localClaimName));
                                out.write("\" selected> ");
                                out.print(Encode.forHtmlContent(localClaimName));
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t\t\t\t");
                            } else {
                                out.write(" \n");
                                out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(localClaimName));
                                out.write('"');
                                out.write('>');
                                out.write(' ');
                                out.print(Encode.forHtmlContent(localClaimName));
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t\t\t");
                            }
                        }
                        out.write("\n");
                        out.write("\t\t\t\t\t\t\t\t\t</select>\n");
                        out.write(
                                "                               \t</td>                                   \n");
                        out.write("                                   <td style=\"");
                        out.print(isLocalClaimsSelected ? "display:none;" : "");
                        out.write("\">\n");
                        out.write("                                   ");
                        if ("true".equals(appBean.getRequestedClaims().get(entry.getValue()))) {
                            out.write("                                 \n");
                            out.write(
                                    "                                   <input type=\"checkbox\"  id=\"spClaim_req_");
                            out.print(i);
                            out.write("\" name=\"spClaim_req_");
                            out.print(i);
                            out.write("\" checked/>\n");
                            out.write("                                   ");
                        } else {
                            out.write("\n");
                            out.write(
                                    "                                    <input type=\"checkbox\"  id=\"spClaim_req_");
                            out.print(i);
                            out.write("\" name=\"spClaim_req_");
                            out.print(i);
                            out.write("\" />\n");
                            out.write("                                   ");
                        }
                        out.write("\n");
                        out.write("                                   </td>\n");
                        out.write("                                  \n");
                        out.write("                                   <td>\n");
                        out.write("                                       <a title=\"");
                        if (_jspx_meth_fmt_005fmessage_005f21(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\"\n");
                        out.write(
                                "                                          onclick=\"deleteClaimRow(this);return false;\"\n");
                        out.write("                                          href=\"#\"\n");
                        out.write("                                          class=\"icon-link\"\n");
                        out.write(
                                "                                          style=\"background-image: url(images/delete.gif)\">\n");
                        out.write("                                           ");
                        if (_jspx_meth_fmt_005fmessage_005f22(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\n");
                        out.write("                                       </a>\n");
                        out.write("                                   </td>\n");
                        out.write("                               </tr>\n");
                        out.write("                               ");
                    }
                    out.write("\n");
                    out.write("                              ");
                }
                out.write("\n");
                out.write("                              </tbody>\n");
                out.write("                    \t\t</table>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t</tr>\n");
                out.write("\n");
                out.write("                    <tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\">");
                if (_jspx_meth_fmt_005fmessage_005f23(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                        \t<td>\n");
                out.write(
                        "                        \t<select class=\"leftCol-med\" id=\"subject_claim_uri\" name=\"subject_claim_uri\" style=\" margin-left: 5px; \">\n");
                out.write("                        \t\t<option value=\"\">---Select---</option>\n");
                out.write("                        \t\t");
                if (isLocalClaimsSelected) {
                    String[] localClaimUris = appBean.getClaimUris();
                    for (String localClaimName : localClaimUris) {
                        if (appBean.getSubjectClaimUri() != null
                                && localClaimName.equals(appBean.getSubjectClaimUri())) {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(localClaimName));
                            out.write("\" selected> ");
                            out.print(Encode.forHtmlContent(localClaimName));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t");
                        } else {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(localClaimName));
                            out.write('"');
                            out.write('>');
                            out.write(' ');
                            out.print(Encode.forHtmlContent(localClaimName));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t");
                        }
                    }
                } else {
                    for (Map.Entry<String, String> entry : claimMapping.entrySet()) {
                        out.write("\n");
                        out.write("                        \t\t\t ");
                        if (entry.getValue() != null && !entry.getValue().isEmpty()) {
                            if (appBean.getSubjectClaimUri() != null
                                    && appBean.getSubjectClaimUri().equals(entry.getValue())) {
                                out.write("\n");
                                out.write("                        \t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write("\" selected> ");
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                        \t\t\t\t");
                            } else {
                                out.write("\n");
                                out.write("                            \t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write('"');
                                out.write('>');
                                out.write(' ');
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                            \t\t\t ");
                            }
                        }
                    }
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t</select>\n");
                out.write("\t\t\t\t\t\t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    </table>\n");
                out.write("\n");
                out.write(
                        "                    <input type=\"hidden\" name=\"number_of_claimmappings\" id=\"number_of_claimmappings\" value=\"1\">\n");
                out.write("                    <div id=\"localClaimsList\" style=\"display: none;\">\n");
                out.write("                  \t\t<select style=\"float:left; width: 100%\">\t\t\t\t\t\t\t\n");
                out.write("\t\t\t\t\t\t\t");
                String[] localClaims = appBean.getClaimUris();
                StringBuffer allLocalClaims = new StringBuffer();
                for (String localClaimName : localClaims) {
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t<option value=\"");
                    out.print(Encode.forHtmlAttribute(localClaimName));
                    out.write('"');
                    out.write('>');
                    out.write(' ');
                    out.print(Encode.forHtmlContent(localClaimName));
                    out.write("</option>\n");
                    out.write("\t\t\t\t\t\t\t\t");

                    allLocalClaims.append(localClaimName + ",");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t</select>\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write("\t\t\t\t\t<input type=\"hidden\" id =\"local_calim_uris\" value=\"");
                out.print(Encode.forHtmlAttribute(allLocalClaims.toString()));
                out.write("\" >\n");
                out.write("                  \t<div id=\"roleMappingSelection\" style=\"");
                out.print(isLocalClaimsSelected ? "display:none" : "");
                out.write("\">\n");
                out.write(
                        "                    <table class=\"carbonFormTable\" style=\"padding-top: 10px\">\n");
                out.write("                  \t<tr>\n");
                out.write("                  \t\t<td class=\"leftCol-med labelField\" style=\"width:15%\">\n");
                out.write("\t\t\t\t\t\t\t<label id=\"addClaimUrisLbl\">");
                if (_jspx_meth_fmt_005fmessage_005f24(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":</label>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("                        <td >\n");
                out.write(
                        "                        \t<select id=\"roleClaim\" name=\"roleClaim\" style=\"float:left;min-width: 250px;\">\n");
                out.write("                        \t\t<option value=\"\">---Select---</option>\n");
                out.write("                        \t\t");
                if (!isLocalClaimsSelected) {
                    for (Map.Entry<String, String> entry : claimMapping.entrySet()) {
                        out.write("\n");
                        out.write("                        \t\t\t ");
                        if (entry.getValue() != null && !entry.getValue().isEmpty()) {
                            if (appBean.getRoleClaimUri() != null
                                    && appBean.getRoleClaimUri().equals(entry.getValue())) {
                                out.write("\n");
                                out.write("                        \t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write("\" selected> ");
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                        \t\t\t\t");
                            } else {
                                out.write("\n");
                                out.write("                            \t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write('"');
                                out.write('>');
                                out.write(' ');
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                            \t\t\t");
                            }
                        }
                        out.write("\n");
                        out.write("                        \t\t\t");
                    }
                    out.write("\t\n");
                    out.write("                        \t\t");
                }
                out.write("\t\t\t\t\t\t\n");
                out.write("\t\t\t\t\t\t\t</select>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t</tr>\n");
                out.write("\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t<td class=\"leftCol-med\" style=\"width:15%\"></td>\n");
                out.write("\t\t\t\t\t\t<td>\n");
                out.write("                           <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f25(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                    </div>\n");
                out.write("            </div>\n");
                out.write("              \n");
                out.write(
                        "\t\t\t<h2 id=\"authorization_permission_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f26(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"permissionConfRow\">\n");
                out.write(
                        "            <h2 id=\"permission_mapping_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                \t\t<a href=\"#\">Permissions</a>\n");
                out.write("            \t\t</h2>\n");
                out.write(
                        "            \t   <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display: none;\" id=\"appPermissionRow\">\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                   <tr>\n");
                out.write("                        <td>\n");
                out.write(
                        "                            <a id=\"permissionAddLink\" class=\"icon-link\" style=\"background-image:url(images/add.gif);margin-left:0;\">");
                if (_jspx_meth_fmt_005fmessage_005f27(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("                            <div style=\"clear:both\"></div>\n");
                out.write("                           \t<div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f28(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write(
                        "                            <table class=\"styledLeft\" id=\"permissionAddTable\" >\n");
                out.write("                                <thead>\n");
                out.write("                                </thead>\n");
                out.write("                                <tbody>\n");
                out.write("                                ");
                if (permissions != null && !permissions.isEmpty()) {
                    out.write("\n");
                    out.write("                               \n");
                    out.write("                                ");
                    for (int i = 0; i < permissions.size(); i++) {
                        if (permissions.get(i) != null) {

                            out.write("\n");
                            out.write("                                \n");
                            out.write("                                <tr>\n");
                            out.write(
                                    "                                    <td class=\"leftCol-big\"><input style=\"width: 98%;\" type=\"text\" value=\"");
                            out.print(Encode.forHtmlAttribute(permissions.get(i)));
                            out.write(
                                    "\" id=\"app_permission\" name=\"app_permission\" readonly=\"readonly\"/></td>\n");
                            out.write("                                    <td>\n");
                            out.write("                                        <a title=\"");
                            if (_jspx_meth_fmt_005fmessage_005f29(_jspx_th_fmt_005fbundle_005f0,
                                    _jspx_page_context))
                                return;
                            out.write("\"\n");
                            out.write(
                                    "                                           onclick=\"deletePermissionRow(this);return false;\"\n");
                            out.write("                                           href=\"#\"\n");
                            out.write("                                           class=\"icon-link\"\n");
                            out.write(
                                    "                                           style=\"background-image: url(images/delete.gif)\">\n");
                            out.write("                                            ");
                            if (_jspx_meth_fmt_005fmessage_005f30(_jspx_th_fmt_005fbundle_005f0,
                                    _jspx_page_context))
                                return;
                            out.write("\n");
                            out.write("                                        </a>\n");
                            out.write("                                    </td>\n");
                            out.write("                                </tr>\n");
                            out.write("                                ");
                        }
                    }
                    out.write("\n");
                    out.write("                                ");
                }
                out.write("\n");
                out.write("                                </tbody>\n");
                out.write("                            </table>\n");
                out.write("                            <div style=\"clear:both\"/>\n");
                out.write(
                        "                            <input type=\"hidden\" name=\"number_of_permissions\" id=\"number_of_permissions\" value=\"1\">\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    \n");
                out.write("\t\t\t\t\t</table>\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write(
                        "\t\t\t\t\t<h2 id=\"role_mapping_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                \t\t<a href=\"#\">Role Mapping</a>\n");
                out.write("            \t\t</h2>\n");
                out.write(
                        "            \t   <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display: none;\" id=\"roleMappingRowRow\">\n");
                out.write("                    <table>\n");
                out.write("                    <tr>\n");
                out.write("\t\t\t\t\t\t<td>\n");
                out.write(
                        "\t\t\t\t\t\t\t<a id=\"roleMappingAddLink\" class=\"icon-link\" style=\"background-image: url(images/add.gif);margin-left:0;\">");
                if (_jspx_meth_fmt_005fmessage_005f31(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("\t\t\t\t\t\t\t<div style=\"clear:both\"/>\n");
                out.write("                            <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f32(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t</tr>\n");
                out.write("                    </table>\n");
                out.write(
                        "\t\t\t\t\t<table class=\"styledLeft\" id=\"roleMappingAddTable\" style=\"display:none\">\n");
                out.write("                              <thead><tr><th class=\"leftCol-big\">");
                if (_jspx_meth_fmt_005fmessage_005f33(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th><th class=\"leftCol-big\">");
                if (_jspx_meth_fmt_005fmessage_005f34(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th><th>");
                if (_jspx_meth_fmt_005fmessage_005f35(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th></tr></thead>\n");
                out.write("                              <tbody>\n");
                out.write("                              ");
                if (roleMapping != null && !roleMapping.isEmpty()) {
                    out.write("\n");
                    out.write("                              <script>\n");
                    out.write(
                            "                                  $(jQuery('#roleMappingAddTable')).toggle();\n");
                    out.write("                              </script>\n");
                    out.write("                               ");

                    int i = -1;
                    for (Map.Entry<String, String> entry : roleMapping.entrySet()) {
                        i++;

                        out.write("\n");
                        out.write("                               <tr>\n");
                        out.write("                               \t<td >\n");
                        out.write(
                                "                               \t\t<input style=\"width: 98%;\" class=\"roleMapIdp\" type=\"text\" value=\"");
                        out.print(Encode.forHtmlAttribute(entry.getKey()));
                        out.write("\" id=\"idpRole_");
                        out.print(i);
                        out.write("\" name=\"idpRole_");
                        out.print(i);
                        out.write("\" readonly=\"readonly\"/>\n");
                        out.write("                               \t</td>\n");
                        out.write(
                                "                                   <td><input style=\"width: 98%;\" class=\"roleMapSp\" type=\"text\" value=\"");
                        out.print(Encode.forHtmlAttribute(entry.getValue()));
                        out.write("\" id=\"spRole_");
                        out.print(i);
                        out.write("\" name=\"spRole_");
                        out.print(i);
                        out.write("\" readonly=\"readonly\"/></td>\n");
                        out.write("                                   <td>\n");
                        out.write("                                       <a title=\"");
                        if (_jspx_meth_fmt_005fmessage_005f36(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\"\n");
                        out.write(
                                "                                          onclick=\"deleteRoleMappingRow(this);return false;\"\n");
                        out.write("                                          href=\"#\"\n");
                        out.write("                                          class=\"icon-link\"\n");
                        out.write(
                                "                                          style=\"background-image: url(images/delete.gif)\">\n");
                        out.write("                                           ");
                        if (_jspx_meth_fmt_005fmessage_005f37(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\n");
                        out.write("                                       </a>\n");
                        out.write("                                   </td>\n");
                        out.write("                               </tr>\n");
                        out.write("                               ");
                    }
                    out.write("\n");
                    out.write("                              ");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t</tbody>\n");
                out.write("                      </table>\n");
                out.write(
                        "\t\t\t\t\t<input type=\"hidden\" name=\"number_of_rolemappings\" id=\"number_of_rolemappings\" value=\"1\">\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write("            </div>\n");
                out.write("\n");
                out.write(
                        "            <h2 id=\"app_authentication_head\"  class=\"sectionSeperator trigger active\">\t\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f38(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write("            \n");
                out.write("            ");
                if (display != null && (display.equals("oauthapp") || display.equals("samlIssuer")
                        || display.equals("serviceName") || display.equals("kerberos"))) {
                    out.write("\n");
                    out.write(
                            "                  <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"inbound_auth_request_div\">\n");
                    out.write("            ");
                } else {
                    out.write("\n");
                    out.write(
                            "                  <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"inbound_auth_request_div\">           \n");
                    out.write("            ");
                }
                out.write("\n");
                out.write(
                        "            <h2 id=\"saml.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f39(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("                ");
                if (appBean.getSAMLIssuer() != null) {
                    out.write("\n");
                    out.write(
                            "                \t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("                ");
                }
                out.write("\n");
                out.write("            </h2>\n");
                out.write("            \n");
                out.write("           ");
                if (display != null && display.equals("samlIssuer")) {
                    out.write("            \n");
                    out.write(
                            "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"saml.config.div\">\n");
                    out.write("          ");
                } else {
                    out.write("\n");
                    out.write(
                            "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"saml.config.div\">          \n");
                    out.write("          ");
                }
                out.write("\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                    <tr>\n");
                out.write("                        <td class=\"leftCol-med labelField\">\n");
                out.write("                        ");

                if (appBean.getSAMLIssuer() == null) {

                    out.write("\n");
                    out.write(
                            "                            <a id=\"saml_link\" class=\"icon-link\" onclick=\"onSamlSsoClick()\">");
                    if (_jspx_meth_fmt_005fmessage_005f40(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\t\t\t\t\t\t ");

                } else {

                    out.write("\n");
                    out.write("\t\t\t\t\t\t \t\t<div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t \t<table class=\"styledLeft\" id=\"samlTable\">\n");
                    out.write("                                <thead><tr><th class=\"leftCol-big\">");
                    if (_jspx_meth_fmt_005fmessage_005f41(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th><th class=\"leftCol-big\">");
                    if (_jspx_meth_fmt_005fmessage_005f42(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th><th>");
                    if (_jspx_meth_fmt_005fmessage_005f43(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th></tr></thead>\n");
                    out.write("                                <tbody>\n");
                    out.write("                                <tr><td>");
                    out.print(Encode.forHtmlContent(appBean.getSAMLIssuer()));
                    out.write("</td>\n");
                    out.write("                                \t<td>\n");
                    out.write("                                \t\t");
                    if (attributeConsumingServiceIndex == null || attributeConsumingServiceIndex.isEmpty()) {
                        attributeConsumingServiceIndex = appBean.getAttributeConsumingServiceIndex();
                    }

                    if (attributeConsumingServiceIndex != null) {
                        out.write("\n");
                        out.write("                                \t\t\t\t");
                        out.print(Encode.forHtmlContent(attributeConsumingServiceIndex));
                        out.write("\n");
                        out.write("                                \t\t\t");
                    }
                    out.write("\n");
                    out.write("                                \t</td>\n");
                    out.write("                                \t\t<td style=\"white-space: nowrap;\">\n");
                    out.write(
                            "                                \t\t\t<a title=\"Edit Service Providers\" onclick=\"updateBeanAndRedirect('../sso-saml/add_service_provider.jsp?SPAction=editServiceProvider&issuer=");
                    out.print(Encode.forUriComponent(appBean.getSAMLIssuer()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\"  class=\"icon-link\" style=\"background-image: url(../admin/images/edit.gif)\">Edit</a>\n");
                    out.write(
                            "                                \t\t\t<a title=\"Delete Service Providers\" onclick=\"updateBeanAndRedirect('../sso-saml/remove_service_providers.jsp?issuer=");
                    out.print(Encode.forUriComponent(appBean.getSAMLIssuer()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                    out.write("                                \t\t</td>\n");
                    out.write("                                \t</tr>\n");
                    out.write("                                </tbody>\n");
                    out.write("                                </table>\t\t\n");
                    out.write("\t\t\t\t\t\t ");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                    \n");
                out.write("                    </div>\n");
                out.write(
                        "            <h2 id=\"oauth.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f44(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("                ");
                if (appBean.getOIDCClientId() != null) {
                    out.write("\n");
                    out.write(
                            "                \t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("                ");
                }
                out.write("\n");
                out.write("            </h2>\n");
                out.write("            ");
                if (display != null && display.equals("oauthapp")) {
                    out.write("                        \n");
                    out.write(
                            "                <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"oauth.config.div\">\n");
                    out.write("            ");
                } else {
                    out.write("\n");
                    out.write(
                            "                <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"oauth.config.div\">\n");
                    out.write("            ");
                }
                out.write("\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                    <tr>\n");
                out.write("                    \t<td>\n");
                out.write("\t                    \t");

                if (appBean.getOIDCClientId() == null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t                        <a id=\"oauth_link\" class=\"icon-link\" onclick=\"onOauthClick()\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t");
                    if (_jspx_meth_fmt_005fmessage_005f45(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\t\t\t\t\t\t\t ");

                } else {

                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t <div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t <table class=\"styledLeft\" id=\"samlTable\">\n");
                    out.write("                                <thead>\n");
                    out.write("                                \t<tr>\n");
                    out.write(
                            "                                \t\t<th class=\"leftCol-big\">OAuth Client Key</th>\n");
                    out.write(
                            "                                \t\t<th class=\"leftCol-big\">OAuth Client Secret</th>\n");
                    out.write("                                \t\t<th>");
                    if (_jspx_meth_fmt_005fmessage_005f46(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th>\n");
                    out.write("                                \t</tr>\n");
                    out.write("                                </thead>\n");
                    out.write("                                <tbody>\n");
                    out.write("                                <tr>\n");
                    out.write("                                \t<td>");
                    out.print(Encode.forHtmlContent(appBean.getOIDCClientId()));
                    out.write("</td>\n");
                    out.write("                                \t<td>\n");
                    out.write("                                \t\t");
                    if (oauthConsumerSecret == null || oauthConsumerSecret.isEmpty()) {
                        oauthConsumerSecret = appBean.getOauthConsumerSecret();
                    }
                    if (oauthConsumerSecret != null) {
                        out.write("\n");
                        out.write("                                \t\t\t\t<div>\n");
                        out.write(
                                "                                \t\t\t\t\t<input style=\"border: none; background: white;\" type=\"password\" id=\"oauthConsumerSecret\" name=\"oauthConsumerSecret\" value=\"");
                        out.print(Encode.forHtmlAttribute(oauthConsumerSecret));
                        out.write("\"readonly=\"readonly\">\n");
                        out.write("                                \t\t\t\t\t<span style=\"float: right;\">\n");
                        out.write(
                                "                                \t\t\t\t\t\t<a style=\"margin-top: 5px;\" class=\"showHideBtn\" onclick=\"showHidePassword(this, 'oauthConsumerSecret')\">Show</a>\n");
                        out.write("                                \t\t\t\t\t</span>\n");
                        out.write("                                \t\t\t\t</div>\n");
                        out.write("                                \t\t  ");
                    }
                    out.write("\n");
                    out.write("                                \t</td>\n");
                    out.write("                                \t\t<td style=\"white-space: nowrap;\">\n");
                    out.write(
                            "                                \t\t\t<a title=\"Edit Service Providers\" onclick=\"updateBeanAndRedirect('../oauth/edit.jsp?appName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\"  class=\"icon-link\" style=\"background-image: url(../admin/images/edit.gif)\">Edit</a>\n");
                    out.write(
                            "                                \t\t\t<a title=\"Delete Service Providers\" onclick=\"updateBeanAndRedirect('../oauth/remove-app.jsp?consumerkey=");
                    out.print(Encode.forUriComponent(appBean.getOIDCClientId()));
                    out.write("&appName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                    out.write("                                \t\t</td>\n");
                    out.write("                                \t</tr>\n");
                    out.write("                                </tbody>\n");
                    out.write("                                </table>\n");
                    out.write("\t\t\t\t\t\t\t ");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                    </div>\n");
                out.write("\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t<h2 id=\"openid.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("\t\t\t\t\t<a href=\"#\">OpenID Configuration</a>\n");
                out.write(
                        "\t\t\t\t\t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                out.write("\t\t\t\t</h2>\n");
                out.write(
                        "\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"openid.config.div\">\n");
                out.write("\t\t\t\t\t<table class=\"carbonFormTable\">\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t\t<td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("\t\t\t\t\t\t\t\t");
                if (_jspx_meth_fmt_005fmessage_005f47(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("\t\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t\t\t<td>\n");
                out.write("\t\t\t\t\t\t\t\t");

                if (appBean.getOpenIDRealm() != null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t<input style=\"width:50%\" id=\"openidRealm\" name=\"openidRealm\" type=\"text\" value=\"");
                    out.print(Encode.forHtmlAttribute(appBean.getOpenIDRealm()));
                    out.write("\" autofocus/>\n");
                    out.write("\t\t\t\t\t\t\t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t<input style=\"width:50%\" id=\"openidRealm\" name=\"openidRealm\" type=\"text\" value=\"\" autofocus/>\n");
                    out.write("\t\t\t\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t<div class=\"sectionHelp\">\n");
                out.write("\t\t\t\t\t\t\t\t\t");
                if (_jspx_meth_fmt_005fmessage_005f48(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t</div>\n");
                out.write("\t\t\t\t\t\t\t</td>\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t</tr>\n");
                out.write("\n");
                out.write("\t\t\t\t\t</table>\n");
                out.write("\t\t\t\t</div>\n");
                out.write("\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t<h2 id=\"passive.sts.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">WS-Federation (Passive) Configuration</a>\n");
                out.write(
                        "                <div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"passive.config.div\">\n");
                out.write("                  <table class=\"carbonFormTable\">\n");
                out.write("                    \n");
                out.write("                    <tr>\n");
                out.write("                    \t<td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("                    \t\t");
                if (_jspx_meth_fmt_005fmessage_005f49(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                    \t</td>\n");
                out.write("                    \t<td>\n");
                out.write("                    \t    ");

                if (appBean.getPassiveSTSRealm() != null) {

                    out.write("\t                    \n");
                    out.write(
                            "                            <input style=\"width:50%\" id=\"passiveSTSRealm\" name=\"passiveSTSRealm\" type=\"text\" value=\"");
                    out.print(Encode.forHtmlAttribute(appBean.getPassiveSTSRealm()));
                    out.write("\" autofocus/>\n");
                    out.write("                            ");
                } else {
                    out.write("\n");
                    out.write(
                            "                            <input style=\"width:50%\" id=\"passiveSTSRealm\" name=\"passiveSTSRealm\" type=\"text\" value=\"\" autofocus/>\n");
                    out.write("                            ");
                }
                out.write("\n");
                out.write("                          <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f50(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                        \n");
                out.write("                    </tr>\n");
                out.write("                      <tr>\n");
                out.write(
                        "                          <td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("                              ");
                if (_jspx_meth_fmt_005fmessage_005f51(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                          </td>\n");
                out.write("                          <td>\n");
                out.write("                              ");

                if (appBean.getPassiveSTSWReply() != null) {

                    out.write("\n");
                    out.write(
                            "                              <input style=\"width:50%\" id=\"passiveSTSWReply\" name=\"passiveSTSWReply\" type=\"text\" value=\"");
                    out.print(Encode.forHtmlAttribute(appBean.getPassiveSTSWReply()));
                    out.write("\" autofocus/>\n");
                    out.write("                              ");
                } else {
                    out.write("\n");
                    out.write(
                            "                              <input style=\"width:50%\" id=\"passiveSTSWReply\" name=\"passiveSTSWReply\" type=\"text\" value=\"\" autofocus/>\n");
                    out.write("                              ");
                }
                out.write("\n");
                out.write("                              <div class=\"sectionHelp\">\n");
                out.write("                                  ");
                if (_jspx_meth_fmt_005fmessage_005f52(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                              </div>\n");
                out.write("                          </td>\n");
                out.write("\n");
                out.write("                      </tr>\n");
                out.write("                   \n");
                out.write("                  </table>\n");
                out.write("            </div>\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t<h2 id=\"wst.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("\t\t\t\t\t<a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f53(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("\t\t\t\t\t");
                if (appBean.getWstrustSP() != null) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t</h2>\n");
                out.write("\t\t\t\t\t\t");
                if (display != null && display.equals("serviceName")) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"wst.config.div\">\n");
                    out.write("\t\t\t\t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"wst.config.div\">\n");
                    out.write("\t\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t<table class=\"carbonFormTable\">\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t\t\t<td>\n");
                out.write("\t\t\t\t\t\t\t\t\t");

                if (appBean.getWstrustSP() == null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t<a id=\"sts_link\" class=\"icon-link\" onclick=\"onSTSClick()\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t");
                    if (_jspx_meth_fmt_005fmessage_005f54(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t");

                } else {

                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t\t\t<table class=\"styledLeft\" id=\"samlTable\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t<thead><tr><th class=\"leftCol-med\">Audience</th><th>");
                    if (_jspx_meth_fmt_005fmessage_005f55(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th></tr></thead>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t<tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t<tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t<td>");
                    out.print(Encode.forHtmlContent(appBean.getWstrustSP()));
                    out.write("</td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t<td style=\"white-space: nowrap;\">\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"Edit Audience\" onclick=\"updateBeanAndRedirect('../generic-sts/sts.jsp?spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("&&spAudience=");
                    out.print(Encode.forUriComponent(appBean.getWstrustSP()));
                    out.write(
                            "&spAction=spEdit');\"  class=\"icon-link\" style=\"background-image: url(../admin/images/edit.gif)\">Edit</a>\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"Delete Audience\" onclick=\"updateBeanAndRedirect('../generic-sts/remove-trusted-service.jsp?action=delete&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("&endpointaddrs=");
                    out.print(Encode.forUriComponent(appBean.getWstrustSP()));
                    out.write(
                            "');\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t</td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t</tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t</tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t\t</table>\n");
                    out.write("\t\t\t\t\t\t\t\t\t");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                out.write("\t\t\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t\t\t</tr>\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t</table>\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t   <h2 id=\"kerberos.kdc.head\" class=\"sectionSeperator trigger active\"\n");
                out.write("\t\t\t\t\t   style=\"background-color: beige;\">\n");
                out.write("\t\t\t\t\t   <a href=\"#\">Kerberos KDC</a>\n");
                out.write("\n");
                out.write("\t\t\t\t\t  ");
                if (appBean.getKerberosServiceName() != null) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t   \t\t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("\t\t\t\t\t   ");
                }
                out.write("\n");
                out.write("\t\t\t\t   </h2>\n");
                out.write("\n");
                out.write("\t\t\t\t\t");
                if (display != null && display.equals("kerberos")) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"kerberos.config.div\">\n");
                    out.write("\t\t\t\t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\"\n");
                    out.write("\t\t\t\t\t\t\t\t id=\"kerberos.config.div\">\n");
                    out.write("\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\n");
                out.write("\t\t\t\t\t   <table class=\"carbonFormTable\">\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t   <tr>\n");
                out.write("\t\t\t\t\t\t\t   <td>\n");
                out.write("\t\t\t\t\t\t\t\t   ");

                if (appBean.getKerberosServiceName() == null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t   <a id=\"kerberos_link\" class=\"icon-link\" onclick=\"onKerberosClick()\">");
                    if (_jspx_meth_fmt_005fmessage_005f56(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t   ");
                } else {
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t   <div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t\t   <table class=\"styledLeft\" id=\"kerberosTable\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <thead>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <th class=\"leftCol-big\">");
                    if (_jspx_meth_fmt_005fmessage_005f57(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <th>");
                    if (_jspx_meth_fmt_005fmessage_005f58(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </thead>\n");
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <td>");
                    out.print(Encode.forHtmlContent(appBean.getKerberosServiceName()));
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   </td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <td style=\"white-space: nowrap;\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t   <a title=\"Change Password\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  onclick=\"updateBeanAndRedirect('../servicestore/change-passwd.jsp?SPAction=changePWr&spnName=");
                    out.print(Encode.forUriComponent(appBean.getKerberosServiceName()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("');\"\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t\t  class=\"icon-link\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  style=\"background-image: url(../admin/images/edit.gif)\">Change Password</a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t   <a title=\"Delete\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  onclick=\"updateBeanAndRedirect('../servicestore/delete-finish.jsp?SPAction=delete&spnName=");
                    out.print(Encode.forUriComponent(appBean.getKerberosServiceName()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("');\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  class=\"icon-link\" style=\"background-image: url(images/delete.gif)\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t\t   Delete </a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   </td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t   </table>\n");
                    out.write("\t\t\t\t\t\t\t\t   ");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t   </td>\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t   </tr>\n");
                out.write("\n");
                out.write("\t\t\t\t\t   </table>\n");
                out.write("\t\t\t\t   </div>\n");
                out.write("\n");
                out.write("                        ");

                List<String> standardInboundAuthTypes = new ArrayList<String>();
                standardInboundAuthTypes = new ArrayList<String>();
                standardInboundAuthTypes.add("oauth2");
                standardInboundAuthTypes.add("wstrust");
                standardInboundAuthTypes.add("samlsso");
                standardInboundAuthTypes.add("openid");
                standardInboundAuthTypes.add("passivests");

                if (!CollectionUtils.isEmpty(appBean.getInboundAuthenticators())) {
                    List<InboundAuthenticationRequestConfig> customAuthenticators = appBean
                            .getInboundAuthenticators();
                    for (InboundAuthenticationRequestConfig customAuthenticator : customAuthenticators) {
                        if (!standardInboundAuthTypes.contains(customAuthenticator.getInboundAuthType())) {
                            String type = customAuthenticator.getInboundAuthType();
                            String friendlyName = customAuthenticator.getFriendlyName();

                            out.write("\n");
                            out.write("\n");
                            out.write(
                                    "                        <h2 id=\"openid.config.head\" class=\"sectionSeperator trigger active\"\n");
                            out.write("                            style=\"background-color: beige;\">\n");
                            out.write("                            <a href=\"#\">");
                            out.print(friendlyName);
                            out.write("\n");
                            out.write("                            </a>\n");
                            out.write("\n");
                            out.write(
                                    "                            <div class=\"enablelogo\"><img src=\"images/ok.png\" width=\"16\" height=\"16\"></div>\n");
                            out.write("                        </h2>\n");
                            out.write(
                                    "                        <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\"\n");
                            out.write("                             id=\"openid.config.div\">\n");
                            out.write("                            <table class=\"carbonFormTable\">\n");
                            out.write("                                ");

                            Property[] properties = customAuthenticator.getProperties();
                            for (Property prop : properties) {
                                String propName = "custom_auth_prop_name_" + type + "_" + prop.getName();

                                out.write("\n");
                                out.write("\n");
                                out.write("                                <tr>\n");
                                out.write(
                                        "                                    <td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                                out.write("                                        ");
                                out.print(prop.getDisplayName() + ":");
                                out.write("\n");
                                out.write("                                    </td>\n");
                                out.write("                                    <td>\n");
                                out.write("                                        ");

                                if (prop.getValue() != null) {

                                    out.write("\n");
                                    out.write(
                                            "                                        <input style=\"width:50%\" id=\"");
                                    out.print(propName);
                                    out.write("\" name=\"");
                                    out.print(propName);
                                    out.write("\" type=\"text\"\n");
                                    out.write("                                               value=\"");
                                    out.print(prop.getValue());
                                    out.write("\" autofocus/>\n");
                                    out.write("                                        ");
                                } else {
                                    out.write("\n");
                                    out.write(
                                            "                                        <input style=\"width:50%\" id=\"");
                                    out.print(propName);
                                    out.write("\" name=\"");
                                    out.print(propName);
                                    out.write("\" type=\"text\"\n");
                                    out.write("                                               autofocus/>\n");
                                    out.write("                                        ");
                                }
                                out.write("\n");
                                out.write("\n");
                                out.write("                                    </td>\n");
                                out.write("\n");
                                out.write("                                </tr>\n");
                                out.write("                                ");

                            }

                            out.write("\n");
                            out.write("\n");
                            out.write("                            </table>\n");
                            out.write("                        </div>\n");
                            out.write("                        ");

                        }
                    }
                }

                out.write("\n");
                out.write("\n");
                out.write("\t\t\t   </div>\n");
                out.write("            \n");
                out.write(
                        "             <h2 id=\"app_authentication_advance_head\"  class=\"sectionSeperator trigger active\">\n");
                out.write("               \t\t<a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f59(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("           \t\t  </h2>\n");
                out.write("           \t\t  ");
                if (display != null && "auth_config".equals(display)) {
                    out.write("\n");
                    out.write(
                            "           \t\t    <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:block;\" id=\"advanceAuthnConfRow\">\n");
                    out.write("           \t\t  ");
                } else {
                    out.write("\n");
                    out.write(
                            "                    <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"advanceAuthnConfRow\">\n");
                    out.write("                   ");
                }
                out.write("\n");
                out.write("                   \t<table class=\"carbonFormTable\">\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\">");
                if (_jspx_meth_fmt_005fmessage_005f60(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":<span class=\"required\">*</span>\n");
                out.write("                    \t\t</td>\n");
                out.write("                        \t<td class=\"leftCol-med\">\n");
                out.write("                        \t");
                if (ApplicationBean.AUTH_TYPE_DEFAULT.equals(appBean.getAuthenticationType())) {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"default\" name=\"auth_type\" value=\"default\" checked><label for=\"default\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f61(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"default\" name=\"auth_type\" value=\"default\" ><label for=\"default\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f62(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t");
                }
                out.write("\n");
                out.write("                        \t</td>\n");
                out.write("                        \t<td/>\n");
                out.write("                    \t</tr>   \n");
                out.write("                  \t\t  \t<tr>\n");
                out.write(
                        "                    \t\t<td style=\"width:15%\" class=\"leftCol-med labelField\"/>\n");
                out.write("                        \t<td>\n");
                out.write("                        \t");
                if (ApplicationBean.AUTH_TYPE_LOCAL.equals(appBean.getAuthenticationType())) {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"local\" name=\"auth_type\" value=\"local\" checked><label for=\"local\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f63(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"local\" name=\"auth_type\" value=\"local\"><label for=\"local\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f64(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                }
                out.write("\n");
                out.write("                        \t</td>\n");
                out.write("                        \t<td>\n");
                out.write(
                        "                        \t\t\t<select name=\"local_authenticator\" id=\"local_authenticator\">\n");
                out.write("                        \t\t\t");

                if (appBean.getLocalAuthenticatorConfigs() != null) {
                    LocalAuthenticatorConfig[] localAuthenticatorConfigs = appBean
                            .getLocalAuthenticatorConfigs();
                    for (LocalAuthenticatorConfig authenticator : localAuthenticatorConfigs) {

                        out.write("\n");
                        out.write("\t                        \t\t\t\t");
                        if (authenticator.getName().equals(
                                appBean.getStepZeroAuthenticatorName(ApplicationBean.AUTH_TYPE_LOCAL))) {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(authenticator.getName()));
                            out.write("\" selected>");
                            out.print(Encode.forHtmlContent(authenticator.getDisplayName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t");
                        } else {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(authenticator.getName()));
                            out.write('"');
                            out.write('>');
                            out.print(Encode.forHtmlContent(authenticator.getDisplayName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t");
                        }
                        out.write("\n");
                        out.write("\t\t\t\t\t\t\t\t\t\t");
                    }
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t\t</select>\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>   \n");
                out.write("                    \t");

                if (appBean.getEnabledFederatedIdentityProviders() != null
                        && appBean.getEnabledFederatedIdentityProviders().size() > 0) {
                    out.write("\n");
                    out.write("                    \t<tr>\n");
                    out.write("                    \t\t<td class=\"leftCol-med labelField\"/>\n");
                    out.write("                        \t<td>\n");
                    out.write("                        \t");
                    if (ApplicationBean.AUTH_TYPE_FEDERATED.equals(appBean.getAuthenticationType())) {
                        out.write("\n");
                        out.write(
                                "                        \t\t<input type=\"radio\" id=\"federated\" name=\"auth_type\" value=\"federated\" checked><label for=\"federated\" style=\"cursor: pointer;\">");
                        if (_jspx_meth_fmt_005fmessage_005f65(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("</label>\n");
                        out.write("                        \t");
                    } else {
                        out.write("\n");
                        out.write(
                                "                        \t\t<input type=\"radio\" id=\"federated\" name=\"auth_type\" value=\"federated\"><label for=\"federated\" style=\"cursor: pointer;\">");
                        if (_jspx_meth_fmt_005fmessage_005f66(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("</label>\n");
                        out.write("                        \t");
                    }
                    out.write("\n");
                    out.write("                        \t</td>\n");
                    out.write("                        \t<td>\n");
                    out.write("                        \t\t\t<select name=\"fed_idp\" id=\"fed_idp\">\n");
                    out.write("                        \t\t\t");
                    List<IdentityProvider> idps = appBean.getEnabledFederatedIdentityProviders();
                    String selectedIdP = appBean
                            .getStepZeroAuthenticatorName(ApplicationBean.AUTH_TYPE_FEDERATED);
                    boolean isSelectedIdPUsed = false;
                    for (IdentityProvider idp : idps) {
                        if (selectedIdP != null && idp.getIdentityProviderName().equals(selectedIdP)) {
                            isSelectedIdPUsed = true;

                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                            out.write("\" selected>");
                            out.print(Encode.forHtmlContent(idp.getIdentityProviderName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t");
                        } else {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                            out.write('"');
                            out.write('>');
                            out.print(Encode.forHtmlContent(idp.getIdentityProviderName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t");
                        }
                        out.write("\n");
                        out.write("\t\t\t\t\t\t\t\t\t");
                    }
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t</select>\n");
                    out.write("                        \t</td>\n");
                    out.write("                    \t</tr> \n");
                    out.write("                    \t");
                } else {
                    out.write("\n");
                    out.write("                    \t<tr>\n");
                    out.write("                    \t\t<td class=\"leftCol-med labelField\"/>\n");
                    out.write("                    \t\t<td>\n");
                    out.write(
                            "                    \t\t\t<input type=\"radio\" id=\"disabledFederated\" name=\"auth_type\" value=\"federated\" disabled><label for=\"disabledFederated\">");
                    if (_jspx_meth_fmt_005fmessage_005f67(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                    \t\t</td>\n");
                    out.write("                    \t\t<td></td>\n");
                    out.write("                    \t</tr>\n");
                    out.write("                    \t");
                }
                out.write("\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\"/>\n");
                out.write("                        \t<td>\n");
                out.write("                        \t");
                if (ApplicationBean.AUTH_TYPE_FLOW.equals(appBean.getAuthenticationType())) {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"advanced\" name=\"auth_type\" value=\"flow\" onclick=\"updateBeanAndRedirect('configure-authentication-flow.jsp?spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\" checked><label style=\"cursor: pointer; color: #2F7ABD;\" for=\"advanced\">");
                    if (_jspx_meth_fmt_005fmessage_005f68(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t");
                } else {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"advanced\" name=\"auth_type\" value=\"flow\" onclick=\"updateBeanAndRedirect('configure-authentication-flow.jsp?spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("')\"><label style=\"cursor: pointer; color: #2F7ABD;\" for=\"advanced\">");
                    if (_jspx_meth_fmt_005fmessage_005f69(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                }
                out.write("\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>               \n");
                out.write("                  </table>\n");
                out.write("                  <table class=\"carbonFormTable\" style=\"padding-top: 5px;\">\n");
                out.write("                   \t\t<tr>\n");
                out.write("\t\t\t\t\t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                                <input type=\"checkbox\"  id=\"always_send_local_subject_id\" name=\"always_send_local_subject_id\" ");
                out.print(appBean.isAlwaysSendMappedLocalSubjectId() ? "checked" : "");
                out.write("/><label for=\"always_send_local_subject_id\">");
                if (_jspx_meth_fmt_005fmessage_005f70(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    \t<tr>\n");
                out.write("\t\t\t\t\t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                                <input type=\"checkbox\"  id=\"always_send_auth_list_of_idps\" name=\"always_send_auth_list_of_idps\" ");
                out.print(appBean.isAlwaysSendBackAuthenticatedListOfIdPs() ? "checked" : "");
                out.write("/><label for=\"always_send_auth_list_of_idps\">");
                if (_jspx_meth_fmt_005fmessage_005f71(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("\t\t\t\t\t  <tr>\n");
                out.write("\t\t\t\t\t\t  <td class=\"leftCol-med\">\n");
                out.write(
                        "\t\t\t\t\t\t\t  <input type=\"checkbox\"  id=\"use_tenant_domain_in_local_subject_identifier\"\n");
                out.write("\t\t\t\t\t\t\t\t\t name=\"use_tenant_domain_in_local_subject_identifier\" ");
                out.print(appBean.isUseTenantDomainInLocalSubjectIdentifier() ? "checked" : "");
                out.write("/><label for=\"use_tenant_domain_in_local_subject_identifier\">");
                if (_jspx_meth_fmt_005fmessage_005f72(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("\t\t\t\t\t\t  </td>\n");
                out.write("\t\t\t\t\t  </tr>\n");
                out.write("\t\t\t\t\t  <tr>\n");
                out.write("\t\t\t\t\t\t  <td class=\"leftCol-med\">\n");
                out.write(
                        "\t\t\t\t\t\t\t  <input type=\"checkbox\"  id=\"use_userstore_domain_in_local_subject_identifier\"\n");
                out.write("\t\t\t\t\t\t\t\t\t name=\"use_userstore_domain_in_local_subject_identifier\" ");
                out.print(appBean.isUseUserstoreDomainInLocalSubjectIdentifier() ? "checked" : "");
                out.write("/><label\n");
                out.write("\t\t\t\t\t\t\t\t  for=\"use_userstore_domain_in_local_subject_identifier\">");
                if (_jspx_meth_fmt_005fmessage_005f73(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("\t\t\t\t\t\t  </td>\n");
                out.write("\t\t\t\t\t  </tr>\n");
                out.write("                    </table>\n");
                out.write("\n");
                out.write("                  \n");
                out.write(
                        "                   <h2 id=\"req_path_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f74(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"ReqPathAuth\">\n");
                out.write(
                        "                    <table class=\"styledLeft\" width=\"100%\" id=\"req_path_auth_table\">\n");
                out.write("                    \t<thead>\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td>\n");
                out.write(
                        "                    \t\t\t<select name=\"reqPathAuthType\" style=\"float: left; min-width: 150px;font-size:13px;\">");
                out.print(requestPathAuthTypes.toString());
                out.write("</select>\n");
                out.write(
                        "                    \t\t\t<a id=\"reqPathAuthenticatorAddLink\" class=\"icon-link\" style=\"background-image:url(images/add.gif);\">Add</a>\n");
                out.write("                    \t\t\t<div style=\"clear:both\"></div>\n");
                out.write("                           \t\t<div class=\"sectionHelp\">\n");
                out.write("                                \t");
                if (_jspx_meth_fmt_005fmessage_005f75(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            \t</div>\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    \t</thead>\n");
                out.write("                    \t\n");
                out.write("                    \t");

                if (appBean.getServiceProvider().getRequestPathAuthenticatorConfigs() != null
                        && appBean.getServiceProvider().getRequestPathAuthenticatorConfigs().length > 0) {
                    int x = 0;
                    for (RequestPathAuthenticatorConfig reqAth : appBean.getServiceProvider()
                            .getRequestPathAuthenticatorConfigs()) {
                        if (reqAth != null) {

                            out.write("\n");
                            out.write("                    \t\t\t <tr>\n");
                            out.write("                    \t\t\t <td>\n");
                            out.write(
                                    "                    \t\t\t \t<input name=\"req_path_auth\" id=\"req_path_auth\" type=\"hidden\" value=\"");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" />\n");
                            out.write("                    \t\t\t \t<input name=\"req_path_auth_");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" id=\"req_path_auth_");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" type=\"hidden\" value=\"");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" />\n");
                            out.write("                    \t\t\t \t\n");
                            out.write("                    \t\t\t \t");
                            out.print(Encode.forHtmlContent(reqAth.getName()));
                            out.write("\n");
                            out.write("                    \t\t\t </td>\n");
                            out.write("                    \t\t\t <td class=\"leftCol-small\" >\n");
                            out.write(
                                    "                    \t\t\t \t<a onclick=\"deleteReqPathRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                            out.write("                    \t\t\t </td>\n");
                            out.write("                    \t\t\t </tr>\t      \t\t\t \n");
                            out.write("                    \t\t\t ");

                        }
                    }
                }

                out.write("\n");
                out.write("                    </table> \n");
                out.write("            </div>\n");
                out.write("                  \n");
                out.write("            </div>\n");
                out.write("            \n");
                out.write(
                        "            <h2 id=\"inbound_provisioning_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f76(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"inboundProvisioning\">\n");
                out.write("            \n");
                out.write(
                        "             <h2 id=\"scim-inbound_provisioning_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f77(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("             </h2>\n");
                out.write(
                        "                <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"scim-inbound-provisioning-div\">\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write(
                        "                  <tr><td>Service provider based SCIM provisioning is protected via OAuth 2.0. \n");
                out.write(
                        "                  Your service provider must have a valid OAuth 2.0 client key and a client secret to invoke the SCIM API.\n");
                out.write(
                        "                  To create OAuth 2.0 key/secret : Inbound Authentication Configuration -> OAuth/OpenID Connect Configuration.<br/>\n");
                out.write("                  </td></tr>\n");
                out.write("                   <tr>\n");
                out.write("                        <td >\n");
                out.write(
                        "                          <select style=\"min-width: 250px;\" id=\"scim-inbound-userstore\" name=\"scim-inbound-userstore\" ");
                out.print(appBean.getServiceProvider().getInboundProvisioningConfig().getDumbMode() ? "disabled"
                        : "");
                out.write(">\n");
                out.write("                          \t\t<option value=\"\">---Select---</option>\n");
                out.write("                                ");

                if (userStoreDomains != null && userStoreDomains.length > 0) {
                    for (String userStoreDomain : userStoreDomains) {
                        if (userStoreDomain != null) {
                            if (appBean.getServiceProvider().getInboundProvisioningConfig() != null
                                    && appBean.getServiceProvider().getInboundProvisioningConfig()
                                            .getProvisioningUserStore() != null
                                    && userStoreDomain.equals(appBean.getServiceProvider()
                                            .getInboundProvisioningConfig().getProvisioningUserStore())) {

                                out.write("\n");
                                out.write(
                                        "                                          \t\t\t<option selected=\"selected\" value=\"");
                                out.print(Encode.forHtmlAttribute(userStoreDomain));
                                out.write('"');
                                out.write('>');
                                out.print(Encode.forHtmlContent(userStoreDomain));
                                out.write("</option>\n");
                                out.write("                                    ");

                            } else {

                                out.write("\n");
                                out.write("                                           \t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(userStoreDomain));
                                out.write('"');
                                out.write('>');
                                out.print(Encode.forHtmlContent(userStoreDomain));
                                out.write("</option>\n");
                                out.write("                                    ");

                            }
                        }
                    }
                }

                out.write("\n");
                out.write("                          </select>\n");
                out.write("                          <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f78(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    <tr>\n");
                out.write("                        <td>\n");
                out.write(
                        "                            <input type=\"checkbox\" name=\"dumb\" id=\"dumb\" value=\"false\" onclick =\"disable()\" ");
                out.print(appBean.getServiceProvider().getInboundProvisioningConfig().getDumbMode() ? "checked"
                        : "");
                out.write(">Enable Dumb Mode<br>\n");
                out.write("                            <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f79(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                </div>\n");
                out.write("            \n");
                out.write("            \n");
                out.write("            </div>\n");
                out.write("            \n");
                out.write(
                        "            <h2 id=\"outbound_provisioning_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f80(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"outboundProvisioning\">\n");
                out.write("             <table class=\"styledLeft\" width=\"100%\" id=\"fed_auth_table\">\n");
                out.write("            \n");
                out.write("\t\t      ");
                if (idpType != null && idpType.length() > 0) {
                    out.write("\n");
                    out.write("\t\t       <thead> \n");
                    out.write("\t\t       \n");
                    out.write("\t\t\t\t\t<tr>\n");
                    out.write("\t\t\t\t\t\t<td>\t\t\t\t             \t  \n");
                    out.write(
                            "\t\t\t\t\t\t\t <select name=\"provisioning_idps\" style=\"float: left; min-width: 150px;font-size:13px;\">\n");
                    out.write("\t\t\t\t\t\t\t ");
                    out.print(idpType.toString());
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t </select>\n");
                    out.write(
                            "\t\t\t\t\t\t     <a id=\"provisioningIdpAdd\" onclick=\"addIDPRow(this);return false;\" class=\"icon-link\" style=\"background-image:url(images/add.gif);\"></a>\n");
                    out.write("\t\t\t\t\t\t</td>\n");
                    out.write("\t\t            </tr>\n");
                    out.write("\t\t           \n");
                    out.write("\t           </thead>\n");
                    out.write("\t            ");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t              <tr><td colspan=\"4\" style=\"border: none;\">There are no provisioning enabled identity providers defined in the system.</td></tr>\n");
                    out.write("\t\t        ");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t                 \n");
                out.write("\t           ");

                if (appBean.getServiceProvider().getOutboundProvisioningConfig() != null) {
                    IdentityProvider[] fedIdps = appBean.getServiceProvider().getOutboundProvisioningConfig()
                            .getProvisioningIdentityProviders();
                    if (fedIdps != null && fedIdps.length > 0) {
                        for (IdentityProvider idp : fedIdps) {
                            if (idp != null) {
                                boolean jitEnabled = false;
                                boolean blocking = false;

                                if (idp.getJustInTimeProvisioningConfig() != null
                                        && idp.getJustInTimeProvisioningConfig().getProvisioningEnabled()) {
                                    jitEnabled = true;
                                }
                                if (idp.getDefaultProvisioningConnectorConfig() != null
                                        && idp.getDefaultProvisioningConnectorConfig().getBlocking()) {
                                    blocking = true;
                                }

                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t      \n");
                                out.write("\t\t\t\t\t\t\t      \t       <tr>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t   <td>\n");
                                out.write(
                                        "\t\t\t\t\t\t\t      \t      \t\t<input name=\"provisioning_idp\" id=\"\" type=\"hidden\" value=\"");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write("\" />\n");
                                out.write("                                                    ");
                                out.print(Encode.forHtmlContent(idp.getIdentityProviderName()));
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t<td> \n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t\t");
                                if (selectedProIdpConnectors.get(idp.getIdentityProviderName()) != null) {
                                    out.write("\n");
                                    out.write(
                                            "\t\t\t\t\t\t\t      \t      \t\t\t\t<select name=\"provisioning_con_idp_");
                                    out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                    out.write("\" style=\"float: left; min-width: 150px;font-size:13px;\">");
                                    out.print(selectedProIdpConnectors.get(idp.getIdentityProviderName()));
                                    out.write("</select>\n");
                                    out.write("\t\t\t\t\t\t\t      \t      \t\t\t");
                                }
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t <td>\n");
                                out.write(
                                        "                            \t\t\t\t\t\t<div class=\"sectionCheckbox\">\n");
                                out.write(
                                        "                                \t\t\t\t\t\t<input type=\"checkbox\" id=\"blocking_prov_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write("\" name=\"blocking_prov_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write('"');
                                out.write(' ');
                                out.print(blocking ? "checked" : "");
                                out.write(">Blocking\n");
                                out.write("                   \t\t\t\t\t\t\t\t\t</div>\n");
                                out.write("                        \t\t\t\t\t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t <td>\n");
                                out.write(
                                        "                            \t\t\t\t\t\t<div class=\"sectionCheckbox\">\n");
                                out.write(
                                        "                                \t\t\t\t\t\t<input type=\"checkbox\" id=\"provisioning_jit_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write("\" name=\"provisioning_jit_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write('"');
                                out.write(' ');
                                out.print(jitEnabled ? "checked" : "");
                                out.write(">Enable JIT\n");
                                out.write("                   \t\t\t\t\t\t\t\t\t</div>\n");
                                out.write("                        \t\t\t\t\t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t<td class=\"leftCol-small\" >\n");
                                out.write(
                                        "\t\t\t\t\t\t\t      \t      \t\t<a onclick=\"deleteIDPRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t       </tr>\t\t\t\t\t\t      \n");
                                out.write("\t\t\t    ");

                            }
                        }
                    }
                }

                out.write("\n");
                out.write("\t\t\t  </table>\n");
                out.write("            \n");
                out.write("            </div>          \n");
                out.write("\n");
                out.write("\t\t\t<div style=\"clear:both\"/>\n");
                out.write("            <!-- sectionSub Div -->\n");
                out.write("            <div class=\"buttonRow\">\n");
                out.write("                <input type=\"button\" value=\"");
                if (_jspx_meth_fmt_005fmessage_005f81(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\" onclick=\"createAppOnclick();\"/>\n");
                out.write("                <input type=\"button\" value=\"");
                if (_jspx_meth_fmt_005fmessage_005f82(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\" onclick=\"javascript:location.href='list-service-providers.jsp'\"/>\n");
                out.write("            </div>\n");
                out.write("            </form>\n");
                out.write("        </div>\n");
                out.write("    </div>\n");
                out.write("\n");
                int evalDoAfterBody = _jspx_th_fmt_005fbundle_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
            if (_jspx_eval_fmt_005fbundle_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.popBody();
            }
        }
        if (_jspx_th_fmt_005fbundle_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005ffmt_005fbundle_0026_005fbasename.reuse(_jspx_th_fmt_005fbundle_005f0);
            return;
        }
        _005fjspx_005ftagPool_005ffmt_005fbundle_0026_005fbasename.reuse(_jspx_th_fmt_005fbundle_005f0);
        out.write('\n');
    } catch (java.lang.Throwable t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    if (response.isCommitted()) {
                        out.flush();
                    } else {
                        out.clearBuffer();
                    }
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
            else
                throw new ServletException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portlet.site_005fmap.view_jsp.java

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

    PageContext pageContext = null;// w w  w  .j  ava 2s.  c om
    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 {
        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-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        //  portlet:defineObjects
        com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
        _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
        if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
        javax.portlet.ActionRequest actionRequest = null;
        javax.portlet.ActionResponse actionResponse = null;
        javax.portlet.EventRequest eventRequest = null;
        javax.portlet.EventResponse eventResponse = null;
        javax.portlet.PortletConfig portletConfig = null;
        java.lang.String portletName = null;
        javax.portlet.PortletPreferences portletPreferences = null;
        java.util.Map portletPreferencesValues = null;
        javax.portlet.PortletSession portletSession = null;
        java.util.Map portletSessionScope = null;
        javax.portlet.RenderRequest renderRequest = null;
        javax.portlet.RenderResponse renderResponse = null;
        javax.portlet.ResourceRequest resourceRequest = null;
        javax.portlet.ResourceResponse resourceResponse = null;
        actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
        actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
        eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
        eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
        portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
        portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
        portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                .findAttribute("portletPreferences");
        portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
        portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
        portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
        renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
        renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
        resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
        resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                .findAttribute("resourceResponse");
        out.write('\n');
        out.write('\n');

        WindowState windowState = null;
        PortletMode portletMode = null;

        PortletURL currentURLObj = null;

        if (renderRequest != null) {
            windowState = renderRequest.getWindowState();
            portletMode = renderRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(renderRequest, renderResponse);
        } else if (resourceRequest != null) {
            windowState = resourceRequest.getWindowState();
            portletMode = resourceRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(resourceRequest, resourceResponse);
        }

        String currentURL = currentURLObj.toString();
        //String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        PortletPreferences preferences = renderRequest.getPreferences();

        String portletResource = ParamUtil.getString(request, "portletResource");

        if (Validator.isNotNull(portletResource)) {
            preferences = PortletPreferencesFactoryUtil.getPortletSetup(request, portletResource);
        }

        String rootLayoutUuid = GetterUtil
                .getString(preferences.getValue("root-layout-uuid", StringPool.BLANK));
        int displayDepth = GetterUtil.getInteger(preferences.getValue("display-depth", StringPool.BLANK));
        boolean includeRootInTree = GetterUtil
                .getBoolean(preferences.getValue("include-root-in-tree", StringPool.BLANK));
        boolean showCurrentPage = GetterUtil
                .getBoolean(preferences.getValue("show-current-page", StringPool.BLANK));
        boolean useHtmlTitle = GetterUtil.getBoolean(preferences.getValue("use-html-title", StringPool.BLANK));
        boolean showHiddenPages = GetterUtil
                .getBoolean(preferences.getValue("show-hidden-pages", StringPool.BLANK));

        Layout rootLayout = null;

        long rootLayoutId = LayoutConstants.DEFAULT_PARENT_LAYOUT_ID;

        if (Validator.isNotNull(rootLayoutUuid)) {
            includeRootInTree = false;

            rootLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId(rootLayoutUuid, scopeGroupId);

            if (rootLayout != null) {
                rootLayoutId = rootLayout.getLayoutId();
            }
        }

        out.write('\n');
        out.write('\n');

        List<Layout> rootLayouts = LayoutLocalServiceUtil.getLayouts(layout.getGroupId(),
                layout.isPrivateLayout(), rootLayoutId);

        StringBundler sb = new StringBundler();

        _buildSiteMap(layout, rootLayouts, rootLayout, includeRootInTree, displayDepth, showCurrentPage,
                useHtmlTitle, showHiddenPages, 1, themeDisplay, sb);

        out.write('\n');
        out.write('\n');
        out.print(sb.toString());
        out.write('\n');
        out.write('\n');
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.taglib.ui.asset_005fcategories_005fselector.page_jsp.java

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

    PageContext pageContext = null;/*www  .ja  v a  2s .  c o  m*/
    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 {
        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-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

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

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

        String namespace = StringPool.BLANK;

        boolean useNamespace = GetterUtil.getBoolean((String) request.getAttribute("aui:form:useNamespace"),
                true);

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

        String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  portlet:defineObjects
        com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
        _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
        if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
        javax.portlet.ActionRequest actionRequest = null;
        javax.portlet.ActionResponse actionResponse = null;
        javax.portlet.EventRequest eventRequest = null;
        javax.portlet.EventResponse eventResponse = null;
        javax.portlet.PortletConfig portletConfig = null;
        java.lang.String portletName = null;
        javax.portlet.PortletPreferences portletPreferences = null;
        java.util.Map portletPreferencesValues = null;
        javax.portlet.PortletSession portletSession = null;
        java.util.Map portletSessionScope = null;
        javax.portlet.RenderRequest renderRequest = null;
        javax.portlet.RenderResponse renderResponse = null;
        javax.portlet.ResourceRequest resourceRequest = null;
        javax.portlet.ResourceResponse resourceResponse = null;
        actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
        actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
        eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
        eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
        portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
        portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
        portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                .findAttribute("portletPreferences");
        portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
        portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
        portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
        renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
        renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
        resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
        resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                .findAttribute("resourceResponse");
        out.write('\n');
        out.write('\n');

        themeDisplay.setIncludeServiceJs(true);

        String randomNamespace = PortalUtil.generateRandomKey(request,
                "taglib_ui_asset_categories_selector_page") + StringPool.UNDERLINE;

        String className = (String) request.getAttribute("liferay-ui:asset-categories-selector:className");
        long classPK = GetterUtil
                .getLong((String) request.getAttribute("liferay-ui:asset-categories-selector:classPK"));
        String hiddenInput = (String) request.getAttribute("liferay-ui:asset-categories-selector:hiddenInput");
        String curCategoryIds = GetterUtil.getString(
                (String) request.getAttribute("liferay-ui:asset-categories-selector:curCategoryIds"), "");
        String curCategoryNames = StringPool.BLANK;

        if (Validator.isNotNull(className) && (classPK > 0)) {
            List<AssetCategory> categories = AssetCategoryServiceUtil.getCategories(className, classPK);

            curCategoryIds = ListUtil.toString(categories, "categoryId");
            curCategoryNames = ListUtil.toString(categories, "name");
        }

        String curCategoryIdsParam = request.getParameter(hiddenInput);

        if (curCategoryIdsParam != null) {
            curCategoryIds = curCategoryIdsParam;
        }

        if (Validator.isNotNull(curCategoryIds)) {
            long[] curCategoryIdsArray = GetterUtil.getLongValues(StringUtil.split(curCategoryIds));

            if (curCategoryIdsArray.length == 0) {
                curCategoryNames = StringPool.BLANK;
            } else {
                StringBundler sb = new StringBundler(curCategoryIdsArray.length * 2);
                for (long curCategoryId : curCategoryIdsArray) {
                    AssetCategory category = AssetCategoryServiceUtil.getCategory(curCategoryId);

                    sb.append(category.getName());
                    sb.append(StringPool.COMMA);
                }

                sb.setIndex(sb.index() - 1);

                curCategoryNames = sb.toString();
            }
        }

        out.write("\n");
        out.write("\n");
        out.write("<div class=\"lfr-tags-selector-content\" id=\"");
        out.print(namespace + randomNamespace);
        out.write("assetCategoriesSelector\">\n");
        out.write("\t");
        //  aui:input
        com.liferay.taglib.aui.InputTag _jspx_th_aui_005finput_005f0 = (com.liferay.taglib.aui.InputTag) _005fjspx_005ftagPool_005faui_005finput_0026_005ftype_005fname_005fnobody
                .get(com.liferay.taglib.aui.InputTag.class);
        _jspx_th_aui_005finput_005f0.setPageContext(_jspx_page_context);
        _jspx_th_aui_005finput_005f0.setParent(null);
        // /html/taglib/ui/asset_categories_selector/page.jsp(66,1) name = name type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_aui_005finput_005f0.setName(hiddenInput);
        // /html/taglib/ui/asset_categories_selector/page.jsp(66,1) name = type type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_aui_005finput_005f0.setType("hidden");
        int _jspx_eval_aui_005finput_005f0 = _jspx_th_aui_005finput_005f0.doStartTag();
        if (_jspx_th_aui_005finput_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005faui_005finput_0026_005ftype_005fname_005fnobody
                    .reuse(_jspx_th_aui_005finput_005f0);
            return;
        }
        _005fjspx_005ftagPool_005faui_005finput_0026_005ftype_005fname_005fnobody
                .reuse(_jspx_th_aui_005finput_005f0);
        out.write("\n");
        out.write("</div>\n");
        out.write("\n");
        //  aui:script
        com.liferay.taglib.aui.ScriptTag _jspx_th_aui_005fscript_005f0 = (com.liferay.taglib.aui.ScriptTag) _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse
                .get(com.liferay.taglib.aui.ScriptTag.class);
        _jspx_th_aui_005fscript_005f0.setPageContext(_jspx_page_context);
        _jspx_th_aui_005fscript_005f0.setParent(null);
        // /html/taglib/ui/asset_categories_selector/page.jsp(69,0) name = use type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_aui_005fscript_005f0.setUse("liferay-asset-categories-selector");
        int _jspx_eval_aui_005fscript_005f0 = _jspx_th_aui_005fscript_005f0.doStartTag();
        if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.pushBody();
                _jspx_th_aui_005fscript_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                _jspx_th_aui_005fscript_005f0.doInitBody();
            }
            do {
                out.write("\n");
                out.write("\tnew Liferay.AssetCategoriesSelector(\n");
                out.write("\t\t{\n");
                out.write("\t\t\tcontentBox: '#");
                out.print(namespace + randomNamespace);
                out.write("assetCategoriesSelector',\n");
                out.write("\t\t\tcurEntries: '");
                out.print(curCategoryNames);
                out.write("',\n");
                out.write("\t\t\tcurEntryIds: '");
                out.print(curCategoryIds);
                out.write("',\n");
                out.write("\t\t\thiddenInput: '#");
                out.print(namespace + hiddenInput);
                out.write("',\n");
                out.write("\t\t\tinstanceVar: '");
                out.print(namespace + randomNamespace);
                out.write("'\n");
                out.write("\t\t}\n");
                out.write("\t).render();\n");
                int evalDoAfterBody = _jspx_th_aui_005fscript_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
            if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.popBody();
            }
        }
        if (_jspx_th_aui_005fscript_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse.reuse(_jspx_th_aui_005fscript_005f0);
            return;
        }
        _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse.reuse(_jspx_th_aui_005fscript_005f0);
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portal.layout.edit.panel_jsp.java

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

    PageContext pageContext = null;/*from   w w  w .  j  av a 2 s  .  c o  m*/
    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 {
        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;

        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        Layout selLayout = (Layout) request.getAttribute(WebKeys.SEL_LAYOUT);

        String currentLanguageId = LanguageUtil.getLanguageId(request);
        Locale currentLocale = LocaleUtil.fromLanguageId(currentLanguageId);
        Locale defaultLocale = LocaleUtil.getDefault();
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        Locale[] locales = LanguageUtil.getAvailableLocales();

        out.write("\n");
        out.write("\n");
        out.write("<table class=\"lfr-table\">\n");
        out.write("<tr>\n");
        out.write("\t<td>\n");
        out.write("\t\t");
        if (_jspx_meth_liferay_002dui_005fmessage_005f0(_jspx_page_context))
            return;
        out.write("\n");
        out.write("\t</td>\n");
        out.write("\t<td>\n");
        out.write(
                "\t\t<textarea class=\"lfr-textarea\" name=\"TypeSettingsProperties--description--\" wrap=\"soft\">");
        if (_jspx_meth_bean_005fwrite_005f0(_jspx_page_context))
            return;
        out.write("</textarea>\n");
        out.write("\t</td>\n");
        out.write("</tr>\n");
        out.write("</table>\n");
        out.write("\n");
        out.write("<br />\n");
        out.write("\n");
        out.write("<div class=\"portlet-msg-info\">\n");
        out.write("\t");
        if (_jspx_meth_liferay_002dui_005fmessage_005f1(_jspx_page_context))
            return;
        out.write("\n");
        out.write("</div>\n");
        out.write("\n");
        out.write("<input id=\"");
        if (_jspx_meth_portlet_005fnamespace_005f0(_jspx_page_context))
            return;
        out.write(
                "panelSelectedPortlets\" name=\"TypeSettingsProperties--panelSelectedPortlets--\" type=\"hidden\" value=\"");
        if (_jspx_meth_bean_005fwrite_005f1(_jspx_page_context))
            return;
        out.write("\" />\n");
        out.write("\n");

        String panelTreeKey = "panelSelectedPortletsPanelTree";

        out.write("\n");
        out.write("\n");
        out.write("<div id=\"");
        if (_jspx_meth_portlet_005fnamespace_005f1(_jspx_page_context))
            return;
        out.write("panelSelectPortletsOutput\" style=\"margin: 4px;\"></div>\n");
        out.write("\n");
        //  aui:script
        com.liferay.taglib.aui.ScriptTag _jspx_th_aui_005fscript_005f0 = (com.liferay.taglib.aui.ScriptTag) _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse
                .get(com.liferay.taglib.aui.ScriptTag.class);
        _jspx_th_aui_005fscript_005f0.setPageContext(_jspx_page_context);
        _jspx_th_aui_005fscript_005f0.setParent(null);
        // /html/portal/layout/edit/panel.jsp(45,0) name = use type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_aui_005fscript_005f0.setUse("aui-tree-view");
        int _jspx_eval_aui_005fscript_005f0 = _jspx_th_aui_005fscript_005f0.doStartTag();
        if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.pushBody();
                _jspx_th_aui_005fscript_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                _jspx_th_aui_005fscript_005f0.doInitBody();
            }
            do {
                out.write("\n");
                out.write("\tvar panelSelectedPortletsEl = A.one('#");
                if (_jspx_meth_portlet_005fnamespace_005f2(_jspx_th_aui_005fscript_005f0, _jspx_page_context))
                    return;
                out.write("panelSelectedPortlets');\n");
                out.write("\tvar selectedPortlets = panelSelectedPortletsEl.val().split(',');\n");
                out.write("\n");
                out.write("\tvar onCheck = function(event, plid) {\n");
                out.write("\t\tvar node = event.target;\n");
                out.write("\t\tvar add = A.Array.indexOf(selectedPortlets, plid) == -1;\n");
                out.write("\n");
                out.write("\t\tif (plid && add) {\n");
                out.write("\t\t\tselectedPortlets.push(plid);\n");
                out.write("\n");
                out.write("\t\t\tpanelSelectedPortletsEl.val(selectedPortlets.join(','));\n");
                out.write("\t\t}\n");
                out.write("\t};\n");
                out.write("\n");
                out.write("\tvar onUncheck = function(event, plid) {\n");
                out.write("\t\tvar node = event.target;\n");
                out.write("\n");
                out.write("\t\tif (plid) {\n");
                out.write("\t\t\tif (selectedPortlets.length) {\n");
                out.write("\t\t\t\tA.Array.removeItem(selectedPortlets, plid);\n");
                out.write("\t\t\t}\n");
                out.write("\n");
                out.write("\t\t\tpanelSelectedPortletsEl.val( selectedPortlets.join(',') );\n");
                out.write("\t\t}\n");
                out.write("\t};\n");
                out.write("\n");
                out.write("\tvar treeView = new A.TreeView(\n");
                out.write("\t\t{\n");
                out.write("\t\t\tboundingBox: '#");
                if (_jspx_meth_portlet_005fnamespace_005f3(_jspx_th_aui_005fscript_005f0, _jspx_page_context))
                    return;
                out.write("panelSelectPortletsOutput'\n");
                out.write("\t\t}\n");
                out.write("\t).render();\n");
                out.write("\n");
                out.write("\t");

                PortletLister portletLister = new PortletLister();

                portletLister.setIncludeInstanceablePortlets(false);

                TreeView treeView = portletLister.getTreeView(layoutTypePortlet,
                        LanguageUtil.get(pageContext, "application"), user, application);

                Iterator itr = treeView.getList().iterator();

                for (int i = 0; itr.hasNext(); i++) {
                    TreeNodeView treeNodeView = (TreeNodeView) itr.next();

                    out.write("\n");
                    out.write("\n");
                    out.write("\t\tvar parentNode");
                    out.print(i);
                    out.write(" = treeView.getNodeById('treePanel");
                    out.print(treeNodeView.getParentId());
                    out.write("') || treeView;\n");
                    out.write("\t\tvar objId");
                    out.print(i);
                    out.write(" = '");
                    out.print(treeNodeView.getObjId());
                    out.write("';\n");
                    out.write("\t\tvar checked");
                    out.print(i);
                    out.write(" = objId");
                    out.print(i);
                    out.write(" ? (A.Array.indexOf(selectedPortlets, objId");
                    out.print(i);
                    out.write(") > -1) : false;\n");
                    out.write("\n");
                    out.write("\t\tparentNode");
                    out.print(i);
                    out.write(".appendChild(\n");
                    out.write("\t\t\tnew A.TreeNodeTask(\n");
                    out.write("\t\t\t\t{\n");
                    out.write("\t\t\t\t\tchecked: checked");
                    out.print(i);
                    out.write(",\n");
                    out.write("\t\t\t\t\texpanded: ");
                    out.print(treeNodeView.getDepth() == 0);
                    out.write(",\n");
                    out.write("\t\t\t\t\tid: 'treePanel");
                    out.print(treeNodeView.getId());
                    out.write("',\n");
                    out.write("\t\t\t\t\tlabel: '");
                    out.print(UnicodeFormatter.toString(treeNodeView.getName()));
                    out.write("',\n");
                    out.write("\t\t\t\t\tleaf: ");
                    out.print(treeNodeView.getDepth() > 1);
                    out.write(",\n");
                    out.write("\t\t\t\t\ton: {\n");
                    out.write("\t\t\t\t\t\tcheck: A.rbind(onCheck, window, objId");
                    out.print(i);
                    out.write("),\n");
                    out.write("\t\t\t\t\t\tuncheck: A.rbind(onUncheck, window, objId");
                    out.print(i);
                    out.write(")\n");
                    out.write("\t\t\t\t\t}\n");
                    out.write("\t\t\t\t}\n");
                    out.write("\t\t\t)\n");
                    out.write("\t\t);\n");
                    out.write("\n");
                    out.write("\t");

                }

                out.write('\n');
                out.write('\n');
                int evalDoAfterBody = _jspx_th_aui_005fscript_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
            if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.popBody();
            }
        }
        if (_jspx_th_aui_005fscript_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse.reuse(_jspx_th_aui_005fscript_005f0);
            return;
        }
        _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse.reuse(_jspx_th_aui_005fscript_005f0);
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portlet.journal.view_005farticle_005fcontent_jsp.java

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

    PageContext pageContext = null;//w  w  w  .j  ava  2s  .c  o m
    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 {
        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-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        //  portlet:defineObjects
        com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
        _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
        if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
        javax.portlet.ActionRequest actionRequest = null;
        javax.portlet.ActionResponse actionResponse = null;
        javax.portlet.EventRequest eventRequest = null;
        javax.portlet.EventResponse eventResponse = null;
        javax.portlet.PortletConfig portletConfig = null;
        java.lang.String portletName = null;
        javax.portlet.PortletPreferences portletPreferences = null;
        java.util.Map portletPreferencesValues = null;
        javax.portlet.PortletSession portletSession = null;
        java.util.Map portletSessionScope = null;
        javax.portlet.RenderRequest renderRequest = null;
        javax.portlet.RenderResponse renderResponse = null;
        javax.portlet.ResourceRequest resourceRequest = null;
        javax.portlet.ResourceResponse resourceResponse = null;
        actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
        actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
        eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
        eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
        portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
        portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
        portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                .findAttribute("portletPreferences");
        portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
        portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
        portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
        renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
        renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
        resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
        resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                .findAttribute("resourceResponse");
        out.write('\n');
        out.write('\n');

        WindowState windowState = null;
        PortletMode portletMode = null;

        PortletURL currentURLObj = null;

        if (renderRequest != null) {
            windowState = renderRequest.getWindowState();
            portletMode = renderRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(renderRequest, renderResponse);
        } else if (resourceRequest != null) {
            windowState = resourceRequest.getWindowState();
            portletMode = resourceRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(resourceRequest, resourceResponse);
        }

        String currentURL = currentURLObj.toString();
        //String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        PortalPreferences portalPrefs = PortletPreferencesFactoryUtil.getPortalPreferences(request);

        Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
        Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);

        out.write("\n");
        out.write("\n");
        out.write("<html>\n");
        out.write("\n");
        out.write("<head>\n");
        out.write("\t<link href=\"");
        out.print(PortalUtil.getStaticResourceURL(request,
                themeDisplay.getCDNHost() + themeDisplay.getPathContext() + "/html/portal/css.jsp"));
        out.write("\" type=\"text/css\" rel=\"stylesheet\" />\n");
        out.write("\t<link href=\"");
        out.print(PortalUtil.getStaticResourceURL(request, themeDisplay.getPathThemeCss() + "/main.css"));
        out.write("\" rel=\"stylesheet\" type=\"text/css\" />\n");
        out.write("\n");
        out.write("\t");
        //  c:if
        org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
        _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fif_005f0.setParent(null);
        // /html/portlet/journal/view_article_content.jsp(25,1) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fif_005f0.setTest((layout != null) && Validator.isNotNull(layout.getCssText()));
        int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
        if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t\t<style type=\"text/css\">\n");
                out.write("\t\t\t");
                out.print(layout.getCssText());
                out.write("\n");
                out.write("\t\t</style>\n");
                out.write("\t");
                int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
        out.write("\n");
        out.write("</head>\n");
        out.write("\n");
        out.write("<body>\n");
        out.write("\n");
        out.print(request.getAttribute(WebKeys.JOURNAL_ARTICLE_CONTENT));
        out.write("\n");
        out.write("\n");
        out.write("</body>\n");
        out.write("\n");
        out.write("</html>");
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portlet.layout_005fconfiguration.view_005fcategory_jsp.java

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

    PageContext pageContext = null;/*from   ww w  . j a  v a 2s. c  om*/
    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 {
        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-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        //  portlet:defineObjects
        com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
        _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
        if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
        javax.portlet.ActionRequest actionRequest = null;
        javax.portlet.ActionResponse actionResponse = null;
        javax.portlet.EventRequest eventRequest = null;
        javax.portlet.EventResponse eventResponse = null;
        javax.portlet.PortletConfig portletConfig = null;
        java.lang.String portletName = null;
        javax.portlet.PortletPreferences portletPreferences = null;
        java.util.Map portletPreferencesValues = null;
        javax.portlet.PortletSession portletSession = null;
        java.util.Map portletSessionScope = null;
        javax.portlet.RenderRequest renderRequest = null;
        javax.portlet.RenderResponse renderResponse = null;
        javax.portlet.ResourceRequest resourceRequest = null;
        javax.portlet.ResourceResponse resourceResponse = null;
        actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
        actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
        eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
        eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
        portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
        portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
        portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                .findAttribute("portletPreferences");
        portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
        portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
        portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
        renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
        renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
        resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
        resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                .findAttribute("resourceResponse");
        out.write('\n');
        out.write('\n');

        WindowState windowState = null;
        PortletMode portletMode = null;

        PortletURL currentURLObj = null;

        if (renderRequest != null) {
            windowState = renderRequest.getWindowState();
            portletMode = renderRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(renderRequest, renderResponse);
        } else if (resourceRequest != null) {
            windowState = resourceRequest.getWindowState();
            portletMode = resourceRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(resourceRequest, resourceResponse);
        }

        String currentURL = currentURLObj.toString();
        //String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write('\n');
        out.write('\n');

        PortletCategory portletCategory = (PortletCategory) request.getAttribute(WebKeys.PORTLET_CATEGORY);

        int portletCategoryIndex = GetterUtil
                .getInteger((String) request.getAttribute(WebKeys.PORTLET_CATEGORY_INDEX));

        String oldCategoryPath = (String) request.getAttribute(WebKeys.PORTLET_CATEGORY_PATH);

        String newCategoryPath = LanguageUtil.get(pageContext, portletCategory.getName());

        Pattern pattern = Pattern.compile(".*");

        Matcher matcher = pattern.matcher(newCategoryPath);

        StringBundler divId = new StringBundler();

        while (matcher.find()) {
            divId.append(matcher.group());
        }

        newCategoryPath = divId.toString();

        if (Validator.isNotNull(oldCategoryPath)) {
            newCategoryPath = oldCategoryPath + ":" + newCategoryPath;
        }

        List categories = ListUtil.fromCollection(portletCategory.getCategories());

        categories = ListUtil.sort(categories, new PortletCategoryComparator(locale));

        List portlets = new ArrayList();

        Iterator itr = portletCategory.getPortletIds().iterator();

        String externalPortletCategory = null;

        while (itr.hasNext()) {
            String portletId = (String) itr.next();

            Portlet portlet = PortletLocalServiceUtil.getPortletById(user.getCompanyId(), portletId);

            if (portlet != null) {
                portlets.add(portlet);

                PortletApp portletApp = portlet.getPortletApp();

                if (portletApp.isWARFile() && Validator.isNull(externalPortletCategory)) {
                    PortletConfig curPortletConfig = PortletConfigFactoryUtil.create(portlet, application);

                    ResourceBundle resourceBundle = curPortletConfig.getResourceBundle(locale);

                    try {
                        externalPortletCategory = resourceBundle.getString(portletCategory.getName());
                    } catch (MissingResourceException mre) {
                    }
                }
            }
        }

        portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale));

        if (!categories.isEmpty() || !portlets.isEmpty()) {

            out.write("\n");
            out.write("\n");
            out.write("\t<div class=\"lfr-add-content ");
            out.print(layout.isTypePortlet() ? "collapsed" : "");
            out.write("\" id=\"");
            if (_jspx_meth_portlet_005fnamespace_005f0(_jspx_page_context))
                return;
            out.write("portletCategory");
            out.print(portletCategoryIndex);
            out.write("\">\n");
            out.write("\t\t<h2>\n");
            out.write("\t\t\t<span>");
            out.print(Validator.isNotNull(externalPortletCategory) ? externalPortletCategory
                    : LanguageUtil.get(pageContext, portletCategory.getName()));
            out.write("</span>\n");
            out.write("\t\t</h2>\n");
            out.write("\n");
            out.write("\t\t<div class=\"lfr-content-category ");
            out.print(layout.isTypePortlet() ? "aui-helper-hidden" : "");
            out.write("\">\n");
            out.write("\n");
            out.write("\t\t\t");

            itr = categories.iterator();

            while (itr.hasNext()) {
                request.setAttribute(WebKeys.PORTLET_CATEGORY, itr.next());
                request.setAttribute(WebKeys.PORTLET_CATEGORY_INDEX, String.valueOf(portletCategoryIndex));
                request.setAttribute(WebKeys.PORTLET_CATEGORY_PATH, newCategoryPath);

                out.write("\n");
                out.write("\n");
                out.write("\t\t\t\t");
                if (_jspx_meth_liferay_002dutil_005finclude_005f0(_jspx_page_context))
                    return;
                out.write("\n");
                out.write("\n");
                out.write("\t\t\t");

                request.setAttribute(WebKeys.PORTLET_CATEGORY_PATH, oldCategoryPath);

                portletCategoryIndex++;
            }

            itr = portlets.iterator();

            while (itr.hasNext()) {
                Portlet portlet = (Portlet) itr.next();

                divId.setIndex(0);

                divId.append(newCategoryPath);
                divId.append(":");

                matcher = pattern.matcher(PortalUtil.getPortletTitle(portlet, application, locale));

                while (matcher.find()) {
                    divId.append(matcher.group());
                }

                boolean portletInstanceable = portlet.isInstanceable();
                boolean portletUsed = layoutTypePortlet.hasPortletId(portlet.getPortletId());
                boolean portletLocked = (!portletInstanceable && portletUsed);

                if (portletInstanceable && layout.isTypePanel()) {
                    continue;
                }

                out.write("\n");
                out.write("\n");
                out.write("\t\t\t\t");
                //  c:choose
                org.apache.taglibs.standard.tag.common.core.ChooseTag _jspx_th_c_005fchoose_005f0 = (org.apache.taglibs.standard.tag.common.core.ChooseTag) _005fjspx_005ftagPool_005fc_005fchoose
                        .get(org.apache.taglibs.standard.tag.common.core.ChooseTag.class);
                _jspx_th_c_005fchoose_005f0.setPageContext(_jspx_page_context);
                _jspx_th_c_005fchoose_005f0.setParent(null);
                int _jspx_eval_c_005fchoose_005f0 = _jspx_th_c_005fchoose_005f0.doStartTag();
                if (_jspx_eval_c_005fchoose_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                    do {
                        out.write("\n");
                        out.write("\t\t\t\t\t");
                        //  c:when
                        org.apache.taglibs.standard.tag.rt.core.WhenTag _jspx_th_c_005fwhen_005f0 = (org.apache.taglibs.standard.tag.rt.core.WhenTag) _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest
                                .get(org.apache.taglibs.standard.tag.rt.core.WhenTag.class);
                        _jspx_th_c_005fwhen_005f0.setPageContext(_jspx_page_context);
                        _jspx_th_c_005fwhen_005f0
                                .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0);
                        // /html/portlet/layout_configuration/view_category.jsp(133,5) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                        _jspx_th_c_005fwhen_005f0.setTest(layout.isTypePortlet());
                        int _jspx_eval_c_005fwhen_005f0 = _jspx_th_c_005fwhen_005f0.doStartTag();
                        if (_jspx_eval_c_005fwhen_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                            do {
                                out.write("\n");
                                out.write("\n");
                                out.write("\t\t\t\t\t\t");

                                Set<String> footerPortalCssSet = new LinkedHashSet<String>();

                                for (String footerPortalCss : portlet.getFooterPortalCss()) {
                                    if (!HttpUtil.hasProtocol(footerPortalCss)) {
                                        footerPortalCss = PortalUtil.getStaticResourceURL(request,
                                                request.getContextPath() + footerPortalCss,
                                                portlet.getTimestamp());
                                    }

                                    if (!footerPortalCssSet.contains(footerPortalCss)) {
                                        footerPortalCssSet.add(footerPortalCss);
                                    }
                                }

                                Set<String> footerPortalJavaScriptSet = new LinkedHashSet<String>();

                                for (String footerPortalJavaScript : portlet.getFooterPortalJavaScript()) {
                                    if (!HttpUtil.hasProtocol(footerPortalJavaScript)) {
                                        footerPortalJavaScript = PortalUtil.getStaticResourceURL(request,
                                                request.getContextPath() + footerPortalJavaScript,
                                                portlet.getTimestamp());
                                    }

                                    if (!footerPortalJavaScriptSet.contains(footerPortalJavaScript)
                                            && !themeDisplay.isIncludedJs(footerPortalJavaScript)) {
                                        footerPortalJavaScriptSet.add(footerPortalJavaScript);
                                    }
                                }

                                Set<String> footerPortletCssSet = new LinkedHashSet<String>();

                                for (String footerPortletCss : portlet.getFooterPortletCss()) {
                                    if (!HttpUtil.hasProtocol(footerPortletCss)) {
                                        footerPortletCss = PortalUtil.getStaticResourceURL(request,
                                                portlet.getContextPath() + footerPortletCss,
                                                portlet.getTimestamp());
                                    }

                                    if (!footerPortletCssSet.contains(footerPortletCss)) {
                                        footerPortletCssSet.add(footerPortletCss);
                                    }
                                }

                                Set<String> footerPortletJavaScriptSet = new LinkedHashSet<String>();

                                for (String footerPortletJavaScript : portlet.getFooterPortletJavaScript()) {
                                    if (!HttpUtil.hasProtocol(footerPortletJavaScript)) {
                                        footerPortletJavaScript = PortalUtil.getStaticResourceURL(request,
                                                portlet.getContextPath() + footerPortletJavaScript,
                                                portlet.getTimestamp());
                                    }

                                    if (!footerPortletJavaScriptSet.contains(footerPortletJavaScript)) {
                                        footerPortletJavaScriptSet.add(footerPortletJavaScript);
                                    }
                                }

                                Set<String> headerPortalCssSet = new LinkedHashSet<String>();

                                for (String headerPortalCss : portlet.getHeaderPortalCss()) {
                                    if (!HttpUtil.hasProtocol(headerPortalCss)) {
                                        headerPortalCss = PortalUtil.getStaticResourceURL(request,
                                                request.getContextPath() + headerPortalCss,
                                                portlet.getTimestamp());
                                    }

                                    if (!headerPortalCssSet.contains(headerPortalCss)) {
                                        headerPortalCssSet.add(headerPortalCss);
                                    }
                                }

                                Set<String> headerPortalJavaScriptSet = new LinkedHashSet<String>();

                                for (String headerPortalJavaScript : portlet.getHeaderPortalJavaScript()) {
                                    if (!HttpUtil.hasProtocol(headerPortalJavaScript)) {
                                        headerPortalJavaScript = PortalUtil.getStaticResourceURL(request,
                                                request.getContextPath() + headerPortalJavaScript,
                                                portlet.getTimestamp());
                                    }

                                    if (!headerPortalJavaScriptSet.contains(headerPortalJavaScript)
                                            && !themeDisplay.isIncludedJs(headerPortalJavaScript)) {
                                        headerPortalJavaScriptSet.add(headerPortalJavaScript);
                                    }
                                }

                                Set<String> headerPortletCssSet = new LinkedHashSet<String>();

                                for (String headerPortletCss : portlet.getHeaderPortletCss()) {
                                    if (!HttpUtil.hasProtocol(headerPortletCss)) {
                                        headerPortletCss = PortalUtil.getStaticResourceURL(request,
                                                portlet.getContextPath() + headerPortletCss,
                                                portlet.getTimestamp());
                                    }

                                    if (!headerPortletCssSet.contains(headerPortletCss)) {
                                        headerPortletCssSet.add(headerPortletCss);
                                    }
                                }

                                Set<String> headerPortletJavaScriptSet = new LinkedHashSet<String>();

                                for (String headerPortletJavaScript : portlet.getHeaderPortletJavaScript()) {
                                    if (!HttpUtil.hasProtocol(headerPortletJavaScript)) {
                                        headerPortletJavaScript = PortalUtil.getStaticResourceURL(request,
                                                portlet.getContextPath() + headerPortletJavaScript,
                                                portlet.getTimestamp());
                                    }

                                    if (!headerPortletJavaScriptSet.contains(headerPortletJavaScript)) {
                                        headerPortletJavaScriptSet.add(headerPortletJavaScript);
                                    }
                                }

                                out.write("\n");
                                out.write("\n");
                                out.write("\t\t\t\t\t\t<div\n");
                                out.write("\t\t\t\t\t\t\tclass=\"lfr-portlet-item ");
                                //  c:if
                                org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                                        .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
                                _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
                                _jspx_th_c_005fif_005f0
                                        .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fwhen_005f0);
                                // /html/portlet/layout_configuration/view_category.jsp(234,31) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                                _jspx_th_c_005fif_005f0.setTest(portletLocked);
                                int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
                                if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                                    do {
                                        out.write("lfr-portlet-used");
                                        int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
                                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                            break;
                                    } while (true);
                                }
                                if (_jspx_th_c_005fif_005f0
                                        .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                                            .reuse(_jspx_th_c_005fif_005f0);
                                    return;
                                }
                                _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
                                out.write(' ');
                                //  c:if
                                org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                                        .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
                                _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context);
                                _jspx_th_c_005fif_005f1
                                        .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fwhen_005f0);
                                // /html/portlet/layout_configuration/view_category.jsp(234,89) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                                _jspx_th_c_005fif_005f1.setTest(portletInstanceable);
                                int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag();
                                if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                                    do {
                                        out.write("lfr-instanceable");
                                        int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody();
                                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                            break;
                                    } while (true);
                                }
                                if (_jspx_th_c_005fif_005f1
                                        .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                                            .reuse(_jspx_th_c_005fif_005f1);
                                    return;
                                }
                                _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tfooterPortalCssPaths=\"");
                                out.print(StringUtil.merge(footerPortalCssSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tfooterPortalJavaScriptPaths=\"");
                                out.print(StringUtil.merge(footerPortalJavaScriptSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tfooterPortletCssPaths=\"");
                                out.print(StringUtil.merge(footerPortletCssSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tfooterPortletJavaScriptPaths=\"");
                                out.print(StringUtil.merge(footerPortletJavaScriptSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\theaderPortalCssPaths=\"");
                                out.print(StringUtil.merge(headerPortalCssSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\theaderPortalJavaScriptPaths=\"");
                                out.print(StringUtil.merge(headerPortalJavaScriptSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\theaderPortletCssPaths=\"");
                                out.print(StringUtil.merge(headerPortletCssSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\theaderPortletJavaScriptPaths=\"");
                                out.print(StringUtil.merge(headerPortletJavaScriptSet));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tid=\"");
                                if (_jspx_meth_portlet_005fnamespace_005f1(_jspx_th_c_005fwhen_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("portletItem");
                                out.print(portlet.getPortletId());
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tinstanceable=\"");
                                out.print(portletInstanceable);
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tplid=\"");
                                out.print(plid);
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\tportletId=\"");
                                out.print(portlet.getPortletId());
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t\ttitle=\"");
                                out.print(PortalUtil.getPortletTitle(portlet, application, locale));
                                out.write("\"\n");
                                out.write("\t\t\t\t\t\t>\n");
                                out.write("\t\t\t\t\t\t\t<p>");
                                out.print(PortalUtil.getPortletTitle(portlet, application, locale));
                                out.write(" <a href=\"javascript:;\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f0(_jspx_th_c_005fwhen_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</a></p>\n");
                                out.write("\t\t\t\t\t\t</div>\n");
                                out.write("\n");
                                out.write("\t\t\t\t\t\t<input id=\"");
                                if (_jspx_meth_portlet_005fnamespace_005f2(_jspx_th_c_005fwhen_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("portletItem");
                                out.print(portlet.getPortletId());
                                out.write("CategoryPath\" type=\"hidden\" value=\"");
                                out.print(divId.toString().replace(':', '-'));
                                out.write("\" />\n");
                                out.write("\t\t\t\t\t");
                                int evalDoAfterBody = _jspx_th_c_005fwhen_005f0.doAfterBody();
                                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                    break;
                            } while (true);
                        }
                        if (_jspx_th_c_005fwhen_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f0);
                            return;
                        }
                        _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f0);
                        out.write("\n");
                        out.write("\t\t\t\t\t");
                        //  c:otherwise
                        org.apache.taglibs.standard.tag.common.core.OtherwiseTag _jspx_th_c_005fotherwise_005f0 = (org.apache.taglibs.standard.tag.common.core.OtherwiseTag) _005fjspx_005ftagPool_005fc_005fotherwise
                                .get(org.apache.taglibs.standard.tag.common.core.OtherwiseTag.class);
                        _jspx_th_c_005fotherwise_005f0.setPageContext(_jspx_page_context);
                        _jspx_th_c_005fotherwise_005f0
                                .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0);
                        int _jspx_eval_c_005fotherwise_005f0 = _jspx_th_c_005fotherwise_005f0.doStartTag();
                        if (_jspx_eval_c_005fotherwise_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                            do {
                                out.write("\n");
                                out.write("\t\t\t\t\t\t<div>\n");
                                out.write("\t\t\t\t\t\t\t<a href=\"");
                                //  liferay-portlet:renderURL
                                com.liferay.taglib.portlet.RenderURLTag _jspx_th_liferay_002dportlet_005frenderURL_005f0 = (com.liferay.taglib.portlet.RenderURLTag) _005fjspx_005ftagPool_005fliferay_002dportlet_005frenderURL_0026_005fwindowState_005fportletName_005fnobody
                                        .get(com.liferay.taglib.portlet.RenderURLTag.class);
                                _jspx_th_liferay_002dportlet_005frenderURL_005f0
                                        .setPageContext(_jspx_page_context);
                                _jspx_th_liferay_002dportlet_005frenderURL_005f0.setParent(
                                        (javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fotherwise_005f0);
                                // /html/portlet/layout_configuration/view_category.jsp(256,16) name = portletName type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                                _jspx_th_liferay_002dportlet_005frenderURL_005f0
                                        .setPortletName(portlet.getRootPortletId());
                                // /html/portlet/layout_configuration/view_category.jsp(256,16) name = windowState type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                                _jspx_th_liferay_002dportlet_005frenderURL_005f0
                                        .setWindowState(WindowState.MAXIMIZED.toString());
                                int _jspx_eval_liferay_002dportlet_005frenderURL_005f0 = _jspx_th_liferay_002dportlet_005frenderURL_005f0
                                        .doStartTag();
                                if (_jspx_th_liferay_002dportlet_005frenderURL_005f0
                                        .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                    _005fjspx_005ftagPool_005fliferay_002dportlet_005frenderURL_0026_005fwindowState_005fportletName_005fnobody
                                            .reuse(_jspx_th_liferay_002dportlet_005frenderURL_005f0);
                                    return;
                                }
                                _005fjspx_005ftagPool_005fliferay_002dportlet_005frenderURL_0026_005fwindowState_005fportletName_005fnobody
                                        .reuse(_jspx_th_liferay_002dportlet_005frenderURL_005f0);
                                out.write('"');
                                out.write('>');
                                out.print(PortalUtil.getPortletTitle(portlet, application, locale));
                                out.write("</a>\n");
                                out.write("\t\t\t\t\t\t</div>\n");
                                out.write("\t\t\t\t\t");
                                int evalDoAfterBody = _jspx_th_c_005fotherwise_005f0.doAfterBody();
                                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                    break;
                            } while (true);
                        }
                        if (_jspx_th_c_005fotherwise_005f0
                                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
                            return;
                        }
                        _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
                        out.write("\n");
                        out.write("\t\t\t\t");
                        int evalDoAfterBody = _jspx_th_c_005fchoose_005f0.doAfterBody();
                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                            break;
                    } while (true);
                }
                if (_jspx_th_c_005fchoose_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fc_005fchoose.reuse(_jspx_th_c_005fchoose_005f0);
                    return;
                }
                _005fjspx_005ftagPool_005fc_005fchoose.reuse(_jspx_th_c_005fchoose_005f0);
                out.write("\n");
                out.write("\n");
                out.write("\t\t\t");

            }

            out.write("\n");
            out.write("\n");
            out.write("\t\t</div>\n");
            out.write("\t</div>\n");
            out.write("\n");
            out.write("\t<input id=\"");
            if (_jspx_meth_portlet_005fnamespace_005f3(_jspx_page_context))
                return;
            out.write("portletCategory");
            out.print(portletCategoryIndex);
            out.write("CategoryPath\" type=\"hidden\" value=\"");
            out.print(newCategoryPath.replace(':', '-'));
            out.write("\" />\n");
            out.write("\n");

        }

    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portlet.communities.tree_005fjs_jsp.java

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

    PageContext pageContext = null;//from ww  w.  j  a  v a 2s .c o m
    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 {
        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-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        //  portlet:defineObjects
        com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
        _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
        if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
        javax.portlet.ActionRequest actionRequest = null;
        javax.portlet.ActionResponse actionResponse = null;
        javax.portlet.EventRequest eventRequest = null;
        javax.portlet.EventResponse eventResponse = null;
        javax.portlet.PortletConfig portletConfig = null;
        java.lang.String portletName = null;
        javax.portlet.PortletPreferences portletPreferences = null;
        java.util.Map portletPreferencesValues = null;
        javax.portlet.PortletSession portletSession = null;
        java.util.Map portletSessionScope = null;
        javax.portlet.RenderRequest renderRequest = null;
        javax.portlet.RenderResponse renderResponse = null;
        javax.portlet.ResourceRequest resourceRequest = null;
        javax.portlet.ResourceResponse resourceResponse = null;
        actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
        actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
        eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
        eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
        portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
        portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
        portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                .findAttribute("portletPreferences");
        portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
        portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
        portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
        renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
        renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
        resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
        resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                .findAttribute("resourceResponse");
        out.write('\n');
        out.write('\n');

        WindowState windowState = null;
        PortletMode portletMode = null;

        PortletURL currentURLObj = null;

        if (renderRequest != null) {
            windowState = renderRequest.getWindowState();
            portletMode = renderRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(renderRequest, renderResponse);
        } else if (resourceRequest != null) {
            windowState = resourceRequest.getWindowState();
            portletMode = resourceRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(resourceRequest, resourceResponse);
        }

        String currentURL = currentURLObj.toString();
        //String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
        Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);

        out.write('\n');
        out.write('\n');

        long groupId = ((Long) request.getAttribute("edit_pages.jsp-groupId")).longValue();
        long selPlid = ((Long) request.getAttribute("edit_pages.jsp-selPlid")).longValue();
        boolean privateLayout = ((Boolean) request.getAttribute("edit_pages.jsp-privateLayout")).booleanValue();

        String rootNodeName = (String) request.getAttribute("edit_pages.jsp-rootNodeName");

        boolean selectableTree = ParamUtil.getBoolean(request, "selectableTree");
        String treeId = ParamUtil.getString(request, "treeId");

        PortletURL portletURL = (PortletURL) request.getAttribute("edit_pages.jsp-portletURL");

        out.write("\n");
        out.write("\n");
        out.write("<div class=\"lfr-tree-loading\" id=\"");
        if (_jspx_meth_portlet_005fnamespace_005f0(_jspx_page_context))
            return;
        out.write("treeLoading\">\n");
        out.write("\t<span class=\"aui-icon aui-icon-loading lfr-tree-loading-icon\"></span>\n");
        out.write("</div>\n");
        out.write("\n");
        out.write("<div class=\"lfr-tree\" id=\"");
        if (_jspx_meth_portlet_005fnamespace_005f1(_jspx_page_context))
            return;
        out.print(HtmlUtil.escape(treeId));
        out.write("Output\"></div>\n");
        out.write("\n");
        //  aui:script
        com.liferay.taglib.aui.ScriptTag _jspx_th_aui_005fscript_005f0 = (com.liferay.taglib.aui.ScriptTag) _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse
                .get(com.liferay.taglib.aui.ScriptTag.class);
        _jspx_th_aui_005fscript_005f0.setPageContext(_jspx_page_context);
        _jspx_th_aui_005fscript_005f0.setParent(null);
        // /html/portlet/communities/tree_js.jsp(38,0) name = use type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_aui_005fscript_005f0.setUse("aui-io-request,aui-tree-view,dataschema-xml,datatype-xml");
        int _jspx_eval_aui_005fscript_005f0 = _jspx_th_aui_005fscript_005f0.doStartTag();
        if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.pushBody();
                _jspx_th_aui_005fscript_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                _jspx_th_aui_005fscript_005f0.doInitBody();
            }
            do {
                out.write("\n");
                out.write("\tvar TreeUtil = {\n");
                out.write("\t\tDEFAULT_PARENT_LAYOUT_ID: ");
                out.print(LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
                out.write(",\n");
                out.write("\t\tOPEN_NODES: '");
                out.print(SessionTreeJSClicks.getOpenNodes(request, treeId));
                out.write("'.split(','),\n");
                out.write("\t\tPREFIX_LAYOUT_ID: '_layoutId_',\n");
                out.write("\t\tPREFIX_PLID: '_plid_',\n");
                out.write("\t\tSELECTED_NODES: '");
                out.print(SessionTreeJSClicks.getOpenNodes(request, treeId + "SelectedNode"));
                out.write("'.split(','),\n");
                out.write("\n");
                out.write("\t\tafterRenderTree: function(event) {\n");
                out.write("\t\t\tvar treeInstance = event.target;\n");
                out.write("\n");
                out.write("\t\t\tvar rootNode = treeInstance.item(0);\n");
                out.write("\t\t\tvar loadingEl = A.one('#");
                if (_jspx_meth_portlet_005fnamespace_005f2(_jspx_th_aui_005fscript_005f0, _jspx_page_context))
                    return;
                out.write("treeLoading');\n");
                out.write("\n");
                out.write("\t\t\tloadingEl.hide();\n");
                out.write("\n");
                out.write("\t\t\tTreeUtil.restoreNodeState(rootNode);\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\tcreateId: function(layoutId, plid) {\n");
                out.write("\t\t\treturn '");
                out.print(HtmlUtil.escape(treeId));
                out.write("' + TreeUtil.PREFIX_LAYOUT_ID + layoutId + TreeUtil.PREFIX_PLID + plid;\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\tcreateLink: function(label, plid) {\n");
                out.write("\t\t\treturn '<a href=\"");
                out.print(portletURL + StringPool.AMPERSAND + portletDisplay.getNamespace() + "selPlid=");
                out.write("'+ plid +'\">'+ Liferay.Util.escapeHTML(label) +'</a>';\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\textractLayoutId: function(node) {\n");
                out.write("\t\t\treturn node.get('id').match(/layoutId_(\\d+)/)[1];\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\textractPlid: function(node) {\n");
                out.write("\t\t\treturn node.get('id').match(/plid_(\\d+)/)[1];\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\tformatJSONResults: function(json) {\n");
                out.write("\t\t\tvar output = [];\n");
                out.write("\n");
                out.write("\t\t\tA.each(\n");
                out.write("\t\t\t\tjson,\n");
                out.write("\t\t\t\tfunction(node) {\n");
                out.write("\t\t\t\t\tvar nameXML = A.DataType.XML.parse(node.name);\n");
                out.write("\n");
                out.write("\t\t\t\t\tvar schema = {\n");
                out.write("\t\t\t\t\t\tresultListLocator: 'root',\n");
                out.write("\t\t\t\t\t\tresultFields: [\n");
                out.write("\t\t\t\t\t\t\t{\n");
                out.write("\t\t\t\t\t\t\t\tkey: 'label',\n");
                out.write("\t\t\t\t\t\t\t\tlocator: 'name'\n");
                out.write("\t\t\t\t\t\t\t}\n");
                out.write("\t\t\t\t\t\t]\n");
                out.write("\t\t\t\t\t};\n");
                out.write("\n");
                out.write("\t\t\t\t\tvar nodeBase = A.DataSchema.XML.apply(schema, nameXML).results[0];\n");
                out.write("\n");
                out.write("\t\t\t\t\tvar newNode = A.mix(\n");
                out.write("\t\t\t\t\t\tnodeBase,\n");
                out.write("\t\t\t\t\t\t{\n");
                out.write("\t\t\t\t\t\t\tafter: {\n");
                out.write("\t\t\t\t\t\t\t\tcheck: function(event) {\n");
                out.write("\t\t\t\t\t\t\t\t\tvar plid = TreeUtil.extractPlid(event.target);\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t\tTreeUtil.updateSessionTreeClick(plid, true, '");
                out.print(HtmlUtil.escape(treeId));
                out.write("SelectedNode');\n");
                out.write("\t\t\t\t\t\t\t\t},\n");
                out.write("\t\t\t\t\t\t\t\tuncheck: function(event) {\n");
                out.write("\t\t\t\t\t\t\t\t\tvar plid = TreeUtil.extractPlid(event.target);\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t\tTreeUtil.updateSessionTreeClick(plid, false, '");
                out.print(HtmlUtil.escape(treeId));
                out.write("SelectedNode');\n");
                out.write("\t\t\t\t\t\t\t\t}\n");
                out.write("\t\t\t\t\t\t\t},\n");
                out.write("\t\t\t\t\t\t\talwaysShowHitArea: node.hasChildren,\n");
                out.write("\t\t\t\t\t\t\tid: TreeUtil.createId(node.layoutId, node.plid),\n");
                out.write("\t\t\t\t\t\t\ttype: '");
                out.print(selectableTree ? "task" : "io");
                out.write("'\n");
                out.write("\t\t\t\t\t\t}\n");
                out.write("\t\t\t\t\t);\n");
                out.write("\n");
                out.write("\t\t\t\t\tif (!");
                out.print(selectableTree);
                out.write(") {\n");
                out.write("\t\t\t\t\t\tnewNode.label = TreeUtil.createLink(newNode.label, node.plid);\n");
                out.write("\t\t\t\t\t}\n");
                out.write("\n");
                out.write("\t\t\t\t\toutput.push(newNode);\n");
                out.write("\t\t\t\t}\n");
                out.write("\t\t\t);\n");
                out.write("\n");
                out.write("\t\t\treturn output;\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\trestoreNodeState: function(node) {\n");
                out.write("\t\t\tvar instance = this;\n");
                out.write("\n");
                out.write("\t\t\tvar id = node.get('id');\n");
                out.write("\t\t\tvar plid = TreeUtil.extractPlid(node);\n");
                out.write("\n");
                out.write("\t\t\tif (plid == '");
                out.print(selPlid);
                out.write("') {\n");
                out.write("\t\t\t\tnode.select();\n");
                out.write("\t\t\t}\n");
                out.write("\n");
                out.write("\t\t\tif (A.Array.indexOf(TreeUtil.OPEN_NODES, id) > -1) {\n");
                out.write("\t\t\t\tnode.expand();\n");
                out.write("\t\t\t}\n");
                out.write("\n");
                out.write("\t\t\tif (A.Array.indexOf(TreeUtil.SELECTED_NODES, plid) > -1) {\n");
                out.write("\t\t\t\tif (node.check) {\n");
                out.write("\t\t\t\t\tnode.check();\n");
                out.write("\t\t\t\t}\n");
                out.write("\t\t\t}\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\tupdateLayout: function(data) {\n");
                out.write(
                        "\t\t\tvar updateURL = themeDisplay.getPathMain() + '/layout_management/update_page';\n");
                out.write("\n");
                out.write("\t\t\tA.io.request(\n");
                out.write("\t\t\t\tupdateURL,\n");
                out.write("\t\t\t\t{\n");
                out.write("\t\t\t\t\tdata: data\n");
                out.write("\t\t\t\t}\n");
                out.write("\t\t\t);\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\tupdateLayoutParent: function(dragPlid, dropPlid) {\n");
                out.write("\t\t\tTreeUtil.updateLayout(\n");
                out.write("\t\t\t\t{\n");
                out.write("\t\t\t\t\tcmd: 'parent_layout_id',\n");
                out.write("\t\t\t\t\tparentPlid: dropPlid,\n");
                out.write("\t\t\t\t\tplid: dragPlid\n");
                out.write("\t\t\t\t}\n");
                out.write("\t\t\t);\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\tupdateLayoutPriority: function(dragPlid, index) {\n");
                out.write("\t\t\tTreeUtil.updateLayout(\n");
                out.write("\t\t\t\t{\n");
                out.write("\t\t\t\t\tcmd: 'priority',\n");
                out.write("\t\t\t\t\tplid: dragPlid,\n");
                out.write("\t\t\t\t\tpriority: index\n");
                out.write("\t\t\t\t}\n");
                out.write("\t\t\t);\n");
                out.write("\t\t},\n");
                out.write("\n");
                out.write("\t\tupdateSessionTreeClick: function(id, open, treeId) {\n");
                out.write(
                        "\t\t\tvar sessionClickURL = themeDisplay.getPathMain() + '/portal/session_tree_js_click';\n");
                out.write("\n");
                out.write("\t\t\tvar data = {\n");
                out.write("\t\t\t\tnodeId: id,\n");
                out.write("\t\t\t\topenNode: open || false,\n");
                out.write("\t\t\t\ttreeId: treeId\n");
                out.write("\t\t\t};\n");
                out.write("\n");
                out.write("\t\t\tA.io.request(\n");
                out.write("\t\t\t\tsessionClickURL,\n");
                out.write("\t\t\t\t{\n");
                out.write("\t\t\t\t\tdata: data\n");
                out.write("\t\t\t\t}\n");
                out.write("\t\t\t);\n");
                out.write("\t\t}\n");
                out.write("\t};\n");
                out.write("\n");
                out.write(
                        "\tvar getLayoutsURL = themeDisplay.getPathMain() + '/layout_management/get_layouts';\n");
                out.write("\tvar rootId = TreeUtil.createId(TreeUtil.DEFAULT_PARENT_LAYOUT_ID, 0);\n");
                out.write("\tvar rootLabel = '");
                out.print(HtmlUtil.escape(rootNodeName));
                out.write("';\n");
                out.write("\tvar treeElId = '");
                if (_jspx_meth_portlet_005fnamespace_005f3(_jspx_th_aui_005fscript_005f0, _jspx_page_context))
                    return;
                out.print(HtmlUtil.escape(treeId));
                out.write("Output';\n");
                out.write("\n");
                out.write("\tvar RootNodeType = A.TreeNodeTask;\n");
                out.write("\tvar TreeViewType = A.TreeView;\n");
                out.write("\n");
                out.write("\tif (!");
                out.print(selectableTree);
                out.write(") {\n");
                out.write("\t\tRootNodeType = A.TreeNodeIO;\n");
                out.write("\t\tTreeViewType = A.TreeViewDD;\n");
                out.write("\n");
                out.write(
                        "\t\trootLabel = TreeUtil.createLink(rootLabel, TreeUtil.DEFAULT_PARENT_LAYOUT_ID);\n");
                out.write("\t}\n");
                out.write("\n");
                out.write("\tvar rootNode = new RootNodeType(\n");
                out.write("\t\t{\n");
                out.write("\t\t\talwaysShowHitArea: true,\n");
                out.write("\t\t\tdraggable: false,\n");
                out.write("\t\t\tid: rootId,\n");
                out.write("\t\t\tlabel: rootLabel,\n");
                out.write("\t\t\tleaf: false\n");
                out.write("\t\t}\n");
                out.write("\t);\n");
                out.write("\n");
                out.write("\trootNode.get('contentBox').addClass('lfr-root-node');\n");
                out.write("\n");
                out.write("\tvar treeview = new TreeViewType(\n");
                out.write("\t\t{\n");
                out.write("\t\t\tafter: {\n");
                out.write("\t\t\t\tcollapse: function(event) {\n");
                out.write("\t\t\t\t\tvar id = event.tree.node.get('id');\n");
                out.write("\n");
                out.write("\t\t\t\t\tTreeUtil.updateSessionTreeClick(id, false, '");
                out.print(HtmlUtil.escape(treeId));
                out.write("');\n");
                out.write("\t\t\t\t},\n");
                out.write("\t\t\t\texpand: function(event) {\n");
                out.write("\t\t\t\t\tvar id = event.tree.node.get('id');\n");
                out.write("\n");
                out.write("\t\t\t\t\tTreeUtil.updateSessionTreeClick(id, true, '");
                out.print(HtmlUtil.escape(treeId));
                out.write("');\n");
                out.write("\t\t\t\t},\n");
                out.write("\t\t\t\trender: TreeUtil.afterRenderTree\n");
                out.write("\t\t\t},\n");
                out.write("\t\t\tboundingBox: '#' + treeElId,\n");
                out.write("\t\t\tchildren: [rootNode],\n");
                out.write("\t\t\tio: {\n");
                out.write("\t\t\t\tcfg: {\n");
                out.write("\t\t\t\t\tdata: function(node) {\n");
                out.write("\t\t\t\t\t\tvar parentLayoutId = TreeUtil.extractLayoutId(node);\n");
                out.write("\n");
                out.write("\t\t\t\t\t\treturn {\n");
                out.write("\t\t\t\t\t\t\tgroupId: ");
                out.print(groupId);
                out.write(",\n");
                out.write("\t\t\t\t\t\t\tprivateLayout: ");
                out.print(privateLayout);
                out.write(",\n");
                out.write("\t\t\t\t\t\t\tparentLayoutId: parentLayoutId\n");
                out.write("\t\t\t\t\t\t};\n");
                out.write("\t\t\t\t\t},\n");
                out.write("\t\t\t\t\tmethod: AUI.defaults.io.method\n");
                out.write("\t\t\t\t},\n");
                out.write("\t\t\t\tformatter: TreeUtil.formatJSONResults,\n");
                out.write("\t\t\t\turl: getLayoutsURL\n");
                out.write("\t\t\t},\n");
                out.write("\t\t\ton: {\n");
                out.write("\t\t\t\tappend: function(event) {\n");
                out.write("\t\t\t\t\tTreeUtil.restoreNodeState(event.tree.node);\n");
                out.write("\t\t\t\t},\n");
                out.write("\t\t\t\tdrop: function(event) {\n");
                out.write("\t\t\t\t\tvar tree = event.tree;\n");
                out.write("\n");
                out.write("\t\t\t\t\tvar index = tree.dragNode.get('parentNode').indexOf(tree.dragNode);\n");
                out.write("\n");
                out.write("\t\t\t\t\tTreeUtil.updateLayoutPriority(\n");
                out.write("\t\t\t\t\t\tTreeUtil.extractPlid(tree.dragNode),\n");
                out.write("\t\t\t\t\t\tindex\n");
                out.write("\t\t\t\t\t);\n");
                out.write("\t\t\t\t},\n");
                out.write("\t\t\t\tdropAppend: function(event) {\n");
                out.write("\t\t\t\t\tvar tree = event.tree;\n");
                out.write("\n");
                out.write("\t\t\t\t\tTreeUtil.updateLayoutParent(\n");
                out.write("\t\t\t\t\t\tTreeUtil.extractPlid(tree.dragNode),\n");
                out.write("\t\t\t\t\t\tTreeUtil.extractPlid(tree.dropNode)\n");
                out.write("\t\t\t\t\t);\n");
                out.write("\t\t\t\t},\n");
                out.write("\t\t\t\tdropInsert: function(event) {\n");
                out.write("\t\t\t\t\tvar tree = event.tree;\n");
                out.write("\n");
                out.write("\t\t\t\t\tTreeUtil.updateLayoutParent(\n");
                out.write("\t\t\t\t\t\tTreeUtil.extractPlid(tree.dragNode),\n");
                out.write("\t\t\t\t\t\tTreeUtil.extractPlid(tree.dropNode.get('parentNode'))\n");
                out.write("\t\t\t\t\t);\n");
                out.write("\t\t\t\t}\n");
                out.write("\t\t\t},\n");
                out.write("\t\t\ttype: 'pages'\n");
                out.write("\t\t}\n");
                out.write("\t).render();\n");
                int evalDoAfterBody = _jspx_th_aui_005fscript_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
            if (_jspx_eval_aui_005fscript_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.popBody();
            }
        }
        if (_jspx_th_aui_005fscript_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse.reuse(_jspx_th_aui_005fscript_005f0);
            return;
        }
        _005fjspx_005ftagPool_005faui_005fscript_0026_005fuse.reuse(_jspx_th_aui_005fscript_005f0);
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portlet.image_005fgallery.image_005fthumbnail_jsp.java

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

    PageContext pageContext = null;//from w ww .ja va  2s  . co m
    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 {
        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-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        //  portlet:defineObjects
        com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
        _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
        if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
        javax.portlet.ActionRequest actionRequest = null;
        javax.portlet.ActionResponse actionResponse = null;
        javax.portlet.EventRequest eventRequest = null;
        javax.portlet.EventResponse eventResponse = null;
        javax.portlet.PortletConfig portletConfig = null;
        java.lang.String portletName = null;
        javax.portlet.PortletPreferences portletPreferences = null;
        java.util.Map portletPreferencesValues = null;
        javax.portlet.PortletSession portletSession = null;
        java.util.Map portletSessionScope = null;
        javax.portlet.RenderRequest renderRequest = null;
        javax.portlet.RenderResponse renderResponse = null;
        javax.portlet.ResourceRequest resourceRequest = null;
        javax.portlet.ResourceResponse resourceResponse = null;
        actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
        actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
        eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
        eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
        portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
        portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
        portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                .findAttribute("portletPreferences");
        portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
        portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
        portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
        renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
        renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
        resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
        resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                .findAttribute("resourceResponse");
        out.write('\n');
        out.write('\n');

        WindowState windowState = null;
        PortletMode portletMode = null;

        PortletURL currentURLObj = null;

        if (renderRequest != null) {
            windowState = renderRequest.getWindowState();
            portletMode = renderRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(renderRequest, renderResponse);
        } else if (resourceRequest != null) {
            windowState = resourceRequest.getWindowState();
            portletMode = resourceRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(resourceRequest, resourceResponse);
        }

        String currentURL = currentURLObj.toString();
        //String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        PortletPreferences preferences = renderRequest.getPreferences();

        String portletResource = ParamUtil.getString(request, "portletResource");

        if (Validator.isNotNull(portletResource)) {
            preferences = PortletPreferencesFactoryUtil.getPortletSetup(request, portletResource);
        } else if (layout.isTypeControlPanel()) {
            preferences = PortletPreferencesLocalServiceUtil.getPreferences(themeDisplay.getCompanyId(),
                    scopeGroupId, PortletKeys.PREFS_OWNER_TYPE_GROUP, 0, PortletKeys.IMAGE_GALLERY, null);
        }

        long rootFolderId = PrefsParamUtil.getLong(preferences, request, "rootFolderId",
                IGFolderConstants.DEFAULT_PARENT_FOLDER_ID);

        Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);

        out.write('\n');
        out.write('\n');

        ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);

        IGImage image = (IGImage) row.getObject();

        out.write("\n");
        out.write("\n");
        out.write("<table class=\"lfr-table\">\n");
        out.write("<tr>\n");
        out.write("\t<td>\n");
        out.write("\t\t");
        //  aui:a
        com.liferay.taglib.aui.ATag _jspx_th_aui_005fa_005f0 = (com.liferay.taglib.aui.ATag) _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                .get(com.liferay.taglib.aui.ATag.class);
        _jspx_th_aui_005fa_005f0.setPageContext(_jspx_page_context);
        _jspx_th_aui_005fa_005f0.setParent(null);
        // /html/portlet/image_gallery/image_thumbnail.jsp(28,2) name = href type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_aui_005fa_005f0.setHref(themeDisplay.getPathImage() + "/image_gallery?img_id="
                + image.getLargeImageId() + "&t=" + ImageServletTokenUtil.getToken(image.getLargeImageId()));
        // /html/portlet/image_gallery/image_thumbnail.jsp(28,2) name = target type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_aui_005fa_005f0.setTarget("_blank");
        int _jspx_eval_aui_005fa_005f0 = _jspx_th_aui_005fa_005f0.doStartTag();
        if (_jspx_eval_aui_005fa_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_aui_005fa_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.pushBody();
                _jspx_th_aui_005fa_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                _jspx_th_aui_005fa_005f0.doInitBody();
            }
            do {
                out.write("\n");
                out.write("\t\t\t<img border=\"1\" src=\"");
                out.print(themeDisplay.getPathImage());
                out.write("/image_gallery?img_id=");
                out.print(image.getSmallImageId());
                out.write('&');
                out.write('t');
                out.write('=');
                out.print(ImageServletTokenUtil.getToken(image.getSmallImageId()));
                out.write("\" title=\"");
                out.print(image.getDescription());
                out.write("\" />\n");
                out.write("\t\t");
                int evalDoAfterBody = _jspx_th_aui_005fa_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
            if (_jspx_eval_aui_005fa_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.popBody();
            }
        }
        if (_jspx_th_aui_005fa_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref.reuse(_jspx_th_aui_005fa_005f0);
            return;
        }
        _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref.reuse(_jspx_th_aui_005fa_005f0);
        out.write("\n");
        out.write("\t</td>\n");
        out.write("</tr>\n");
        out.write("\n");
        //  c:if
        org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
        _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fif_005f0.setParent(null);
        // /html/portlet/image_gallery/image_thumbnail.jsp(34,0) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fif_005f0.setTest((image.getCustom1ImageId() > 0) || (image.getCustom2ImageId() > 0));
        int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
        if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t<tr>\n");
                out.write("\t\t<td>\n");
                out.write("\t\t\t");
                //  aui:a
                com.liferay.taglib.aui.ATag _jspx_th_aui_005fa_005f1 = (com.liferay.taglib.aui.ATag) _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                        .get(com.liferay.taglib.aui.ATag.class);
                _jspx_th_aui_005fa_005f1.setPageContext(_jspx_page_context);
                _jspx_th_aui_005fa_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0);
                // /html/portlet/image_gallery/image_thumbnail.jsp(37,3) name = href type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_aui_005fa_005f1.setHref(
                        themeDisplay.getPathImage() + "/image_gallery?img_id=" + image.getLargeImageId() + "&t="
                                + ImageServletTokenUtil.getToken(image.getLargeImageId()));
                // /html/portlet/image_gallery/image_thumbnail.jsp(37,3) name = target type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_aui_005fa_005f1.setTarget("_blank");
                int _jspx_eval_aui_005fa_005f1 = _jspx_th_aui_005fa_005f1.doStartTag();
                if (_jspx_eval_aui_005fa_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                    if (_jspx_eval_aui_005fa_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                        out = _jspx_page_context.pushBody();
                        _jspx_th_aui_005fa_005f1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                        _jspx_th_aui_005fa_005f1.doInitBody();
                    }
                    do {
                        out.write("\n");
                        out.write("\t\t\t\t");
                        if (_jspx_meth_liferay_002dui_005fmessage_005f0(_jspx_th_aui_005fa_005f1,
                                _jspx_page_context))
                            return;
                        out.write("\n");
                        out.write("\t\t\t");
                        int evalDoAfterBody = _jspx_th_aui_005fa_005f1.doAfterBody();
                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                            break;
                    } while (true);
                    if (_jspx_eval_aui_005fa_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                        out = _jspx_page_context.popBody();
                    }
                }
                if (_jspx_th_aui_005fa_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                            .reuse(_jspx_th_aui_005fa_005f1);
                    return;
                }
                _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref.reuse(_jspx_th_aui_005fa_005f1);
                out.write("\n");
                out.write("\n");
                out.write("\t\t\t");
                //  c:if
                org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                        .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
                _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context);
                _jspx_th_c_005fif_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0);
                // /html/portlet/image_gallery/image_thumbnail.jsp(41,3) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_c_005fif_005f1.setTest(image.getCustom1ImageId() > 0);
                int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag();
                if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                    do {
                        out.write("\n");
                        out.write("\t\t\t\t|\n");
                        out.write("\n");
                        out.write("\t\t\t\t");
                        //  aui:a
                        com.liferay.taglib.aui.ATag _jspx_th_aui_005fa_005f2 = (com.liferay.taglib.aui.ATag) _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                                .get(com.liferay.taglib.aui.ATag.class);
                        _jspx_th_aui_005fa_005f2.setPageContext(_jspx_page_context);
                        _jspx_th_aui_005fa_005f2
                                .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f1);
                        // /html/portlet/image_gallery/image_thumbnail.jsp(44,4) name = href type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                        _jspx_th_aui_005fa_005f2.setHref(themeDisplay.getPathImage() + "/image_gallery?img_id="
                                + image.getCustom1ImageId() + "&t="
                                + ImageServletTokenUtil.getToken(image.getCustom1ImageId()));
                        // /html/portlet/image_gallery/image_thumbnail.jsp(44,4) name = target type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                        _jspx_th_aui_005fa_005f2.setTarget("_blank");
                        int _jspx_eval_aui_005fa_005f2 = _jspx_th_aui_005fa_005f2.doStartTag();
                        if (_jspx_eval_aui_005fa_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                            if (_jspx_eval_aui_005fa_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.pushBody();
                                _jspx_th_aui_005fa_005f2
                                        .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                _jspx_th_aui_005fa_005f2.doInitBody();
                            }
                            do {
                                out.write("\n");
                                out.write("\t\t\t\t\t");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f1(_jspx_th_aui_005fa_005f2,
                                        _jspx_page_context))
                                    return;
                                out.write(" 1\n");
                                out.write("\t\t\t\t");
                                int evalDoAfterBody = _jspx_th_aui_005fa_005f2.doAfterBody();
                                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                    break;
                            } while (true);
                            if (_jspx_eval_aui_005fa_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.popBody();
                            }
                        }
                        if (_jspx_th_aui_005fa_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                                    .reuse(_jspx_th_aui_005fa_005f2);
                            return;
                        }
                        _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                                .reuse(_jspx_th_aui_005fa_005f2);
                        out.write("\n");
                        out.write("\t\t\t");
                        int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody();
                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                            break;
                    } while (true);
                }
                if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
                    return;
                }
                _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
                out.write("\n");
                out.write("\n");
                out.write("\t\t\t");
                //  c:if
                org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f2 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                        .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
                _jspx_th_c_005fif_005f2.setPageContext(_jspx_page_context);
                _jspx_th_c_005fif_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0);
                // /html/portlet/image_gallery/image_thumbnail.jsp(49,3) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_c_005fif_005f2.setTest(image.getCustom2ImageId() > 0);
                int _jspx_eval_c_005fif_005f2 = _jspx_th_c_005fif_005f2.doStartTag();
                if (_jspx_eval_c_005fif_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                    do {
                        out.write("\n");
                        out.write("\t\t\t\t|\n");
                        out.write("\n");
                        out.write("\t\t\t\t");
                        //  aui:a
                        com.liferay.taglib.aui.ATag _jspx_th_aui_005fa_005f3 = (com.liferay.taglib.aui.ATag) _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                                .get(com.liferay.taglib.aui.ATag.class);
                        _jspx_th_aui_005fa_005f3.setPageContext(_jspx_page_context);
                        _jspx_th_aui_005fa_005f3
                                .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f2);
                        // /html/portlet/image_gallery/image_thumbnail.jsp(52,4) name = href type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                        _jspx_th_aui_005fa_005f3.setHref(themeDisplay.getPathImage() + "/image_gallery?img_id="
                                + image.getCustom2ImageId() + "&t="
                                + ImageServletTokenUtil.getToken(image.getCustom2ImageId()));
                        // /html/portlet/image_gallery/image_thumbnail.jsp(52,4) name = target type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                        _jspx_th_aui_005fa_005f3.setTarget("_blank");
                        int _jspx_eval_aui_005fa_005f3 = _jspx_th_aui_005fa_005f3.doStartTag();
                        if (_jspx_eval_aui_005fa_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                            if (_jspx_eval_aui_005fa_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.pushBody();
                                _jspx_th_aui_005fa_005f3
                                        .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                _jspx_th_aui_005fa_005f3.doInitBody();
                            }
                            do {
                                out.write("\n");
                                out.write("\t\t\t\t\t");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f2(_jspx_th_aui_005fa_005f3,
                                        _jspx_page_context))
                                    return;
                                out.write(" 2\n");
                                out.write("\t\t\t\t");
                                int evalDoAfterBody = _jspx_th_aui_005fa_005f3.doAfterBody();
                                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                    break;
                            } while (true);
                            if (_jspx_eval_aui_005fa_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.popBody();
                            }
                        }
                        if (_jspx_th_aui_005fa_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                                    .reuse(_jspx_th_aui_005fa_005f3);
                            return;
                        }
                        _005fjspx_005ftagPool_005faui_005fa_0026_005ftarget_005fhref
                                .reuse(_jspx_th_aui_005fa_005f3);
                        out.write("\n");
                        out.write("\t\t\t");
                        int evalDoAfterBody = _jspx_th_c_005fif_005f2.doAfterBody();
                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                            break;
                    } while (true);
                }
                if (_jspx_th_c_005fif_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2);
                    return;
                }
                _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2);
                out.write("\n");
                out.write("\t\t</td>\n");
                out.write("\t</tr>\n");
                int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
        out.write("\n");
        out.write("\n");
        out.write("</table>");
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.fileUploader_jsp.java

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

    PageContext pageContext = null;//  www  .  ja  v a  2s .com
    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 {
        response.setContentType("text/html; charset=utf-8");
        pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("<!--\n");
        out.write("Copyright 2012 The Infinit.e Open Source Project\n");
        out.write("\n");
        out.write("Licensed under the Apache License, Version 2.0 (the \"License\");\n");
        out.write("you may not use this file except in compliance with the License.\n");
        out.write("You may obtain a copy of the License at\n");
        out.write("\n");
        out.write("  http://www.apache.org/licenses/LICENSE-2.0\n");
        out.write("\n");
        out.write("Unless required by applicable law or agreed to in writing, software\n");
        out.write("distributed under the License is distributed on an \"AS IS\" BASIS,\n");
        out.write("WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n");
        out.write("See the License for the specific language governing permissions and\n");
        out.write("limitations under the License.\n");
        out.write("-->\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write(
                "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
        out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
        out.write("<head>\n");
        out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n");
        out.write("<title>Infinit.e File Upload Tool</title>\n");
        out.write("<style media=\"screen\" type=\"text/css\">\n");
        out.write("\n");
        out.write("body \n");
        out.write("{\n");
        out.write("\tfont: 14px Arial,sans-serif;\n");
        out.write("}\n");
        out.write("h2\n");
        out.write("{\n");
        out.write("\tfont-family: \"Times New Roman\";\n");
        out.write("\tfont-style: italic;\n");
        out.write("\tfont-variant: normal;\n");
        out.write("\tfont-weight: normal;\n");
        out.write("\tfont-size: 24px;\n");
        out.write("\tline-height: 29px;\n");
        out.write("\tfont-size-adjust: none;\n");
        out.write("\tfont-stretch: normal;\n");
        out.write("\t-x-system-font: none;\n");
        out.write("\tcolor: #d2331f;\n");
        out.write("\tmargin-bottom: 25px;\n");
        out.write("}\n");
        out.write(".show {\n");
        out.write("display: ;\n");
        out.write("visibility: visible;\n");
        out.write("}\n");
        out.write(".hide {\n");
        out.write("display: none;\n");
        out.write("visibility: hidden;\n");
        out.write("}\n");
        out.write("</style>\n");
        out.write("<script language=\"javascript\" src=\"AppConstants.js\"> </script>\n");
        out.write("</head>\n");
        out.write("\n");
        out.write("<body onload=\"populate()\">\n");

        if (API_ROOT == null) {
            ServletContext context = session.getServletContext();
            String realContextPath = context.getRealPath("/");
            ScriptEngineManager manager = new ScriptEngineManager();
            ScriptEngine engine = manager.getEngineByName("javascript");
            try { // EC2 Machines
                FileReader reader = new FileReader(realContextPath + "/AppConstants.js");
                engine.eval(reader);
                reader.close();
                engine.eval("output = getEndPointUrl();");
                API_ROOT = (String) engine.get("output");
                SHARE_ROOT = API_ROOT + "share/get/";
            } catch (Exception je) {
                try { ////////////Windows + Tomcat
                    FileReader reader = new FileReader(realContextPath + "\\..\\AppConstants.js");
                    engine.eval(reader);
                    reader.close();
                    engine.eval("output = getEndPointUrl();");
                    API_ROOT = (String) engine.get("output");
                    SHARE_ROOT = API_ROOT + "share/get/";
                } catch (Exception e) {
                    System.err.println(e.toString());
                }
            }
            if (null == API_ROOT) {
                // Default to localhost
                API_ROOT = "http://localhost:8080/api/";
                SHARE_ROOT = "$infinite/share/get/";
            }

            if (API_ROOT.contains("localhost"))
                localCookie = true;
            else
                localCookie = false;
        }
        Boolean isLoggedIn = isLoggedIn(request, response);
        if (isLoggedIn == null) {
            out.println("The Infinit.e API cannot be reached.");
            out.println(API_ROOT);
        }

        else if (isLoggedIn == true) {
            showAll = (request.getParameter("sudo") != null);
            DEBUG_MODE = (request.getParameter("debug") != null);
            communityList = generateCommunityList(request, response);

            if (request.getParameter("logout") != null) {
                logOut(request, response);
                out.println("<div style=\" text-align: center;\">");
                out.println("<meta http-equiv=\"refresh\" content=\"0\">");
                out.println("</div>");
            } else {

                out.println("<div style=\" text-align: center;\">");
                String contentType = request.getContentType();
                if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {

                    //      Create a new file upload handler
                    ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory());
                    //      Parse the request
                    FileItemIterator iter = upload.getItemIterator(request);
                    byte[] fileBytes = null;
                    String fileDS = null;
                    byte[] iconBytes = null;
                    String iconDS = null;
                    Set<String> communities = new HashSet<String>();
                    boolean isFileSet = false;
                    while (iter.hasNext()) {
                        FileItemStream item = iter.next();
                        String name = item.getFieldName();
                        InputStream stream = item.openStream();
                        if (item.isFormField()) {
                            if (name.equalsIgnoreCase("communities")) {
                                communities.add(Streams.asString(stream));
                            } else
                                request.setAttribute(name, Streams.asString(stream));

                            //out.println("<b>" + name + ":</b>" + request.getAttribute(name).toString()+"</br>");
                        } else {
                            if (name.equalsIgnoreCase("file")) {
                                if (!item.getName().equals(""))
                                    isFileSet = true;
                                fileDS = item.getContentType();
                                fileBytes = IOUtils.toByteArray(stream);

                                // Check if this should be a java-archive (rather than just an octet stream)
                                if (fileDS.equals("application/octet-stream")) {
                                    ZipInputStream zis = new ZipInputStream(
                                            new ByteArrayInputStream(fileBytes));
                                    ZipEntry entry;
                                    while ((entry = zis.getNextEntry()) != null) {
                                        if (entry.getName().endsWith(".class")) {
                                            fileDS = "application/java-archive";
                                            break;
                                        }
                                    }
                                }
                                // Reset stream, and read
                            }
                        }
                    }

                    ////////////////////////////////////Delete Share ////////////////////////////////
                    if (request.getAttribute("deleteId") != null) {
                        String fileId = request.getAttribute("deleteId").toString();
                        if (fileId != null && fileId != "")
                            removeFromShare(fileId, request, response).toString();

                    }
                    ////////////////////////////////////Update Community Info////////////////////////////////
                    else if (null == fileBytes) {
                        String shareId = request.getAttribute("DBId").toString();
                        if (shareId != null && shareId != "")
                            addRemoveCommunities(shareId, communities, request, response);
                    } else {
                        //////////////////////////////////////////////////////////////////////////////////

                        Boolean newUpload = (request.getAttribute("DBId").toString().length() == 0);

                        ///////////////////////////////// SWF Manip  /////////////////////////////////
                        String shareId = request.getAttribute("DBId").toString();
                        String fileUrl = "";
                        String fileId = "";
                        String bin = request.getAttribute("binary").toString();
                        if (request.getAttribute("title") != null && request.getAttribute("description") != null
                                && fileBytes != null) {
                            if (!isFileSet) //if not a binary file or file was not changed
                            {
                                fileId = shareId;
                                if (shareId != null && shareId != "")
                                    addRemoveCommunities(shareId, communities, request, response);
                                out.println("File was not set, just updated communities.");
                            } else if (bin.equals("null")) //is a json file, make sure its okay and upload it
                            {
                                fileId = UpdateToShare(fileBytes, fileDS,
                                        request.getAttribute("title").toString(),
                                        request.getAttribute("description").toString(), shareId, communities,
                                        true, request.getAttribute("type").toString(), newUpload, request,
                                        response);
                            } else //is a binary, do normal
                            {
                                fileId = UpdateToShare(fileBytes, fileDS,
                                        request.getAttribute("title").toString(),
                                        request.getAttribute("description").toString(), shareId, communities,
                                        false, request.getAttribute("type").toString(), newUpload, request,
                                        response);
                            }

                            if (fileId.contains("Failed")) {
                                out.println(fileId);
                            } else {
                                fileUrl = SHARE_ROOT + fileId;
                                if (newUpload)
                                    out.println(
                                            "You have successfully added a file to the share, its location is: "
                                                    + fileUrl);
                                else
                                    out.println(
                                            "You have successfully updated a file on the share, its location is: "
                                                    + fileUrl);
                            }
                        } else {
                            fileUrl = null;
                            out.println("Error: Not enough information provided for file Upload");
                        }

                        ///////////////////////////////// End File Manip  /////////////////////////////////

                        out.println("</div>");
                    }
                } else {
                }

                out.write("\n");
                out.write("\t\n");
                out.write("\t<script>\n");
                out.write("\tfunction clearCommList()\n");
                out.write("\t\t{\n");
                out.write("\t\t\tmult_comms = document.getElementById('communities');\n");
                out.write("\t\t\tfor ( var i = 0, l = mult_comms.options.length, o; i < l; i++ )\n");
                out.write("\t\t\t{\n");
                out.write("\t\t\t  o = mult_comms.options[i];\n");
                out.write("\t\t\t  o.selected = false;\n");
                out.write("\t\t\t}\n");
                out.write("\t\t}\n");
                out.write("\t\tfunction highlightComms(commList)\n");
                out.write("\t\t{\n");
                out.write("\t\t\tmult_comms = document.getElementById('communities');\n");
                out.write("\t\t\tfor ( var i = 0, l = mult_comms.options.length, o; i < l; i++ )\n");
                out.write("\t\t\t{\n");
                out.write("\t\t\t  o = mult_comms.options[i];\n");
                out.write("\t\t\t  if(commList.indexOf(o.value) == -1)\n");
                out.write("\t\t\t\to.selected = false;\n");
                out.write("\t\t\t  else  \n");
                out.write("\t\t\t  \to.selected = true;\n");
                out.write("\t\t\t}\n");
                out.write("\t\t}\n");
                out.write("\tfunction populate()\n");
                out.write("\t{\n");
                out.write("\t\tvar typerow = document.getElementById('typerow');\n");
                out.write("\t\tvar type = document.getElementById('type');\n");
                out.write("\t\tvar title = document.getElementById('title');\n");
                out.write("\t\tvar description = document.getElementById('description');\n");
                out.write("\t\tvar file = document.getElementById('file');\n");
                out.write("\t\tvar created = document.getElementById('created');\n");
                out.write("\t\tvar DBId = document.getElementById('DBId');\n");
                out.write("\t\tvar deleteId = document.getElementById('deleteId');\n");
                out.write("\t\tvar deleteButton = document.getElementById('deleteButton');\n");
                out.write("\t\tvar share_url = document.getElementById('share_url');\n");
                out.write("\t\tvar owner_text = document.getElementById('owner_text');\n");
                out.write("\t\tvar owner = document.getElementById('owner');\n");
                out.write("\t\tvar url_row = document.getElementById('url_row');\n");
                out.write("\t\tvar dropdown = document.getElementById(\"upload_info\");\n");
                out.write("\t\tvar list = dropdown.options[dropdown.selectedIndex].value;\n");
                out.write("\t\tvar binary = document.getElementById(\"binary\");\n");
                out.write("\t\t\n");
                out.write("\t\tif (list == \"new\")\n");
                out.write("\t\t{\n");
                out.write("\t\t\ttitle.value = \"\";\n");
                out.write("\t\t\tdescription.value = \"\";\n");
                out.write("\t\t\ttype.value = \"binary\";\n");
                out.write("\t\t\tcreated.value = \"\";\n");
                out.write("\t\t\tDBId.value = \"\";\n");
                out.write("\t\t\tdeleteId.value = \"\";\n");
                out.write("\t\t\tshare_url.value = \"\";\n");
                out.write("\t\t\towner.value = \"\";\n");
                out.write("\t\t\ttyperow.className = \"hide\";\n");
                out.write("\t\t\turl_row.className = \"hide\";\n");
                out.write("\t\t\towner.className = \"hide\";\n");
                out.write("\t\t\towner_text.className = \"hide\";\n");
                out.write("\t\t\tdeleteButton.className = \"hide\";\n");
                out.write("\t\t\tclearCommList();\n");
                out.write("\t\t\tbinary.value = \"\";\n");
                out.write("\t\t\treturn;\n");
                out.write("\t\t}\n");
                out.write("\t\t\n");
                out.write("\t\tif ( list == \"newJSON\")\n");
                out.write("\t\t{\n");
                out.write("\t\t\ttitle.value = \"\";\n");
                out.write("\t\t\tdescription.value = \"\";\n");
                out.write("\t\t\ttype.value = \"\";\n");
                out.write("\t\t\tcreated.value = \"\";\n");
                out.write("\t\t\tDBId.value = \"\";\n");
                out.write("\t\t\tdeleteId.value = \"\";\n");
                out.write("\t\t\tshare_url.value = \"\";\n");
                out.write("\t\t\towner.value = \"\";\n");
                out.write("\t\t\ttyperow.className = \"show\";\n");
                out.write("\t\t\turl_row.className = \"hide\";\n");
                out.write("\t\t\towner.className = \"hide\";\n");
                out.write("\t\t\towner_text.className = \"hide\";\n");
                out.write("\t\t\tdeleteButton.className = \"hide\";\n");
                out.write("\t\t\tclearCommList();\n");
                out.write("\t\t\tbinary.value = \"null\";\n");
                out.write("\t\t\treturn;\n");
                out.write("\t\t}\n");
                out.write("\t\t\n");
                out.write("\t\t//_id, created, title, description\n");
                out.write("\t\tsplit = list.split(\"$$$\");\n");
                out.write("\t\t\n");
                out.write("\t\tres_id = split[0];\n");
                out.write("\t\tres_created = split[1];\n");
                out.write("\t\tres_title = split[2];\n");
                out.write("\t\tres_description = split[3];\n");
                out.write("\t\tres_url = split[4];\n");
                out.write("\t\tcommunities = split[5];\n");
                out.write("\t\tres_owner = split[6];\n");
                out.write("\t\tres_binary = split[7];\t\t\n");
                out.write("\t\tres_type = split[8];\t\t\t\n");
                out.write("\t\t\n");
                out.write("\t\tif ( res_binary == \"null\" )\n");
                out.write("\t\t{\n");
                out.write("\t\t\ttyperow.className = \"show\";\n");
                out.write("\t\t}\n");
                out.write("\t\telse\n");
                out.write("\t\t{\n");
                out.write("\t\t\ttyperow.className = \"hide\";\n");
                out.write("\t\t}\n");
                out.write("\t\ttitle.value = res_title;\n");
                out.write("\t\tdescription.value = res_description;\n");
                out.write("\t\tcreated.value = res_created;\n");
                out.write("\t\tDBId.value = res_id;\n");
                out.write("\t\tdeleteId.value = res_id;\n");
                out.write("\t\tshare_url.value = res_url;\n");
                out.write("\t\towner.value = res_owner;\t\t\n");
                out.write("\t\tdeleteButton.className = \"show\";\n");
                out.write("\t\towner.className = \"show\";\n");
                out.write("\t\towner_text.className = \"show\";\n");
                out.write("\t\turl_row.className = \"show\";\n");
                out.write("\t\thighlightComms(communities);\t\t\n");
                out.write("\t\tbinary.value = res_binary;\n");
                out.write("\t\ttype.value = res_type;\n");
                out.write("\t}\n");
                out.write("\t\tfunction validate_fields()\n");
                out.write("\t\t{\n");
                out.write("\t\t\ttitle = document.getElementById('title').value;\n");
                out.write("\t\t\tdescription = document.getElementById('description').value;\n");
                out.write("\t\t\tfile = document.getElementById('file').value;\n");
                out.write("\t\t\tbinary = document.getElementById(\"binary\").value;\n");
                out.write("\t\t\ttype = document.getElementById(\"type\").value;\n");
                out.write("\t\t\t//share_url = document.getElementById('share_url').value;\n");
                out.write("\t\t\t//file_url = document.getElementById('file_url').value;\n");
                out.write("\t\t\t//file_check = document.getElementById('file_check').checked;\n");
                out.write("\t\t\t\n");
                out.write("\t\t\tif (title == \"\")\n");
                out.write("\t\t\t{\n");
                out.write("\t\t\t\talert('Please provide a title.');\n");
                out.write("\t\t\t\treturn false;\n");
                out.write("\t\t\t}\n");
                out.write("\t\t\tif (description == \"\")\n");
                out.write("\t\t\t{\n");
                out.write("\t\t\t\talert('Please provide a description.');\n");
                out.write("\t\t\t\treturn false;\n");
                out.write("\t\t\t}\n");
                out.write("\t\t\tif ( binary == \"null\" && type == \"\")\n");
                out.write("\t\t\t{\n");
                out.write("\t\t\t\talert('Please provide a type.');\n");
                out.write("\t\t\t\treturn false;\n");
                out.write("\t\t\t}\n");
                out.write("\t\t\t\n");
                out.write("\t\t\t\n");
                out.write("\t\t}\n");
                out.write("\t\tfunction confirmDelete()\n");
                out.write("\t\t{\n");
                out.write(
                        "\t\t\tvar agree=confirm(\"Are you sure you wish to Delete this file from the File Share?\");\n");
                out.write("\t\t\tif (agree)\n");
                out.write("\t\t\t\treturn true ;\n");
                out.write("\t\t\telse\n");
                out.write("\t\t\t\treturn false ;\n");
                out.write("\t\t}\n");
                out.write("\t\tfunction showResults()\n");
                out.write("\t\t{\n");
                out.write("\t\t\tvar title = document.getElementById('DBId').value;\n");
                out.write("\t\t\tvar url = getEndPointUrl() + \"share/get/\" + title;\n");
                out.write("\t\t\twindow.open(url, '_blank');\n");
                out.write("\t\t\twindow.focus();\t\t\t\n");
                out.write("\t\t}\n");
                out.write("\t\t// -->\n");
                out.write("\t\t</script>\n");
                out.write("\t</script>\n");
                out.write(
                        "\t\t<div id=\"uploader_outter_div\" name=\"uploader_outter_div\" align=\"center\" style=\"width:100%\" >\n");
                out.write(
                        "\t    \t<div id=\"uploader_div\" name=\"uploader_div\" style=\"border-style:solid; border-color:#999999; border-radius: 10px; width:475px; margin:auto\">\n");
                out.write("\t        \t<h2>File Uploader</h2>\n");
                out.write("\t        \t<form id=\"search_form\" name=\"search_form\" method=\"get\">\n");
                out.write("\t        \t\t<div align=\"center\"\">\n");
                out.write("\t        \t\t<label for=\"ext\">Filter On</label>\n");
                out.write("\t\t\t\t\t  <select name=\"ext\" id=\"ext\" onchange=\"this.form.submit();\">\n");
                out.write("\t\t\t\t\t    ");

                out.print(populateMediaTypes(request, response));

                out.write("\n");
                out.write("\t\t\t\t\t  </select>\n");
                out.write("\t\t\t\t\t </div>\n");
                out.write("\t\t\t\t\t ");

                if (showAll)
                    out.print("<input type=\"hidden\" name=\"sudo\" id=\"sudo\" value=\"true\" />");

                out.write("\t        \t\t\n");
                out.write("\t        \t</form>\n");
                out.write(
                        "\t        \t<form id=\"delete_form\" name=\"delete_form\" method=\"post\" enctype=\"multipart/form-data\" onsubmit=\"javascript:return confirmDelete()\" >\n");
                out.write(
                        "\t        \t\t<select id=\"upload_info\" onchange=\"populate()\" name=\"upload_info\"><option value=\"new\">Upload New File</option><option value=\"newJSON\">Upload New JSON</option> ");

                out.print(populatePreviousUploads(request, response));

                out.write("</select>\n");
                out.write(
                        "\t        \t\t<input type=\"submit\" name=\"deleteButton\" id=\"deleteButton\" class=\"hidden\" value=\"Delete\" />\n");
                out.write("\t        \t\t<input type=\"hidden\" name=\"deleteId\" id=\"deleteId\" />\n");
                out.write("\t        \t\t<input type=\"hidden\" name=\"deleteFile\" id=\"deleteFile\" />\n");
                out.write("\t\t\t\t\t ");

                if (showAll)
                    out.print("<input type=\"hidden\" name=\"sudo\" id=\"sudo\" value=\"true\" />");

                out.write("\t        \t\t\n");
                out.write("\t        \t</form>\n");
                out.write(
                        "\t            <form id=\"upload_form\" name=\"upload_form\" method=\"post\" enctype=\"multipart/form-data\" onsubmit=\"javascript:return validate_fields();\" >\n");
                out.write(
                        "\t                <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding-left:10px; padding-right:10px\">\n");
                out.write("\t                  <tr>\n");
                out.write("\t                    <td colspan=\"2\" align=\"center\"></td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr>\n");
                out.write("\t                    <td>Title:</td>\n");
                out.write(
                        "\t                    <td><input type=\"text\" name=\"title\" id=\"title\" size=\"39\" /></td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr>\n");
                out.write("\t                    <td>Description:</td>\n");
                out.write(
                        "\t                    <td><textarea rows=\"4\" cols=\"30\" name=\"description\" id=\"description\" ></textarea></td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr id=\"typerow\">\n");
                out.write("\t                    <td>Type:</td>\n");
                out.write(
                        "\t                    <td><input type=\"text\" name=\"type\" id=\"type\" size=\"39\" /></td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr>\n");
                out.write("\t                  \t<td>Communities:</td>\n");
                out.write("\t                  \t<td>");

                out.print(communityList);

                out.write("</td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr>\n");
                out.write("\t                  \t<td id=\"owner_text\">Owner:</td>\n");
                out.write("\t                  \t<td>\n");
                out.write(
                        "\t                    <input type=\"text\" name=\"owner\" id=\"owner\" readonly=\"readonly\" size=\"25\" />\n");
                out.write("\t                  \t</td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr>\n");
                out.write("\t                    <td>File:</td>\n");
                out.write("\t                    <td><input type=\"file\" name=\"file\" id=\"file\" /></td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr id=\"url_row\" class=\"hide\">\n");
                out.write("\t                  \t<td>Share URL:</td>\n");
                out.write(
                        "\t                  \t<td><input type=\"text\" name=\"share_url\" id=\"share_url\" readonly=\"readonly\" size=\"38\"/>\n");
                out.write(
                        "\t                  \t<input type=\"button\" onclick=\"showResults()\" value=\"View\"/>\n");
                out.write("\t                  \t</td>\n");
                out.write("\t                \t<td></td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                  <tr>\n");
                out.write(
                        "\t                    <td colspan=\"2\" style=\"text-align:right\"><input type=\"submit\" value=\"Submit\" /></td>\n");
                out.write("\t                  </tr>\n");
                out.write("\t                </table>\n");
                out.write("\t\t\t\t\t<input type=\"hidden\" name=\"created\" id=\"created\" />\n");
                out.write("\t\t\t\t\t<input type=\"hidden\" name=\"DBId\" id=\"DBId\" />\n");
                out.write("\t\t\t\t\t<input type=\"hidden\" name=\"fileUrl\" id=\"fileUrl\" />\n");
                out.write("\t\t\t\t\t<input type=\"hidden\" name=\"binary\" id=\"binary\" />\n");
                out.write("\t\t\t\t\t ");

                if (showAll)
                    out.print("<input type=\"hidden\" name=\"sudo\" id=\"sudo\" value=\"true\" />");

                out.write("\t        \t\t\n");
                out.write("\t\t\t\t</form>\n");
                out.write("\t        </div>\n");
                out.write("\t        <form id=\"logout_form\" name=\"logout_form\" method=\"post\">\n");
                out.write(
                        "\t        \t<input type=\"submit\" name=\"logout\" id = \"logout\" value=\"Log Out\" />\n");
                out.write("\t        </form>\n");
                out.write("\t    </div>\n");
                out.write("\t    </p>\n");
                out.write("\t\n");

            }
        } else if (isLoggedIn == false) {
            //localCookie =(request.getParameter("local") != null);
            //System.out.println("LocalCookie = " + localCookie.toString());
            String errorMsg = "";
            if (request.getParameter("logintext") != null || request.getParameter("passwordtext") != null) {
                if (logMeIn(request.getParameter("logintext"), request.getParameter("passwordtext"), request,
                        response)) {
                    showAll = (request.getParameter("sudo") != null);
                    out.println("<meta http-equiv=\"refresh\" content=\"0\">");
                    out.println("Login Success");
                } else {
                    errorMsg = "Log in Failed, Please Try again";
                }

            }

            out.write("\n");
            out.write("\n");
            out.write("<script>\n");
            out.write("\tfunction validate_fields()\n");
            out.write("\t{\n");
            out.write("\t\tuname = document.getElementById('logintext').value;\n");
            out.write("\t\tpword = document.getElementById('passwordtext').value;\n");
            out.write("\t\t\n");
            out.write("\t\tif (uname == \"\")\n");
            out.write("\t\t{\n");
            out.write("\t\t\talert('Please provide your username.');\n");
            out.write("\t\t\treturn false;\n");
            out.write("\t\t}\n");
            out.write("\t\tif (pword == \"\")\n");
            out.write("\t\t{\n");
            out.write("\t\t\talert('Please provide your password.');\n");
            out.write("\t\t\treturn false;\n");
            out.write("\t\t}\n");
            out.write("\t}\n");
            out.write("\n");
            out.write("\n");
            out.write("</script>\n");
            out.write(
                    "\t<div id=\"login_outter_div\" name=\"login_outter_div\" align=\"center\" style=\"width:100%\" >\n");
            out.write(
                    "    \t<div id=\"login_div\" name=\"login_div\" style=\"border-style:solid; border-color:#999999; border-radius: 10px; width:450px; margin:auto\">\n");
            out.write("        \t<h2>Login</h2>\n");
            out.write(
                    "            <form id=\"login_form\" name=\"login_form\" method=\"post\" onsubmit=\"javascript:return validate_fields();\" >\n");
            out.write(
                    "                <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding-left:10px\">\n");
            out.write("                  <tr>\n");
            out.write("                    <td>User Name</td>\n");
            out.write("                    <td>&nbsp;</td>\n");
            out.write("                    <td>Password</td>\n");
            out.write("                  </tr>\n");
            out.write("                  <tr>\n");
            out.write(
                    "                    <td><input type=\"text\" name=\"logintext\" id=\"logintext\" width=\"190px\" /></td>\n");
            out.write("                    <td>&nbsp;</td>\n");
            out.write(
                    "                    <td><input type=\"password\" name=\"passwordtext\" id=\"passwordtext\" width=\"190px\" /></td>\n");
            out.write("                  </tr>\n");
            out.write("                  <tr>\n");
            out.write(
                    "                    <td colspan=\"3\" align=\"right\"><input name=\"Login\" type=\"submit\" value=\"Login\" /></td>\n");
            out.write("                  </tr>\n");
            out.write("                </table>\n");
            out.write("\t\t\t</form>\n");
            out.write("        </div>\n");
            out.write("    </div>\n");
            out.write("\t<div style=\"color: red; text-align: center;\"> ");
            out.print(errorMsg);
            out.write(" </div>\n");

        }

        out.write("\n");
        out.write("    \n");
        out.write("    \n");
        out.write("</body>\n");
        out.write("</html>");
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portlet.journal.edit_005fstructure_005fxsd_005fel_jsp.java

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

    PageContext pageContext = null;/*  w ww  . j  av a  2 s  .c  om*/
    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 {
        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-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\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 scopeGroupId = null;
        com.liferay.portal.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;
        java.lang.Long portletGroupId = 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");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.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");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        //  portlet:defineObjects
        com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
        _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
        if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
        javax.portlet.ActionRequest actionRequest = null;
        javax.portlet.ActionResponse actionResponse = null;
        javax.portlet.EventRequest eventRequest = null;
        javax.portlet.EventResponse eventResponse = null;
        javax.portlet.PortletConfig portletConfig = null;
        java.lang.String portletName = null;
        javax.portlet.PortletPreferences portletPreferences = null;
        java.util.Map portletPreferencesValues = null;
        javax.portlet.PortletSession portletSession = null;
        java.util.Map portletSessionScope = null;
        javax.portlet.RenderRequest renderRequest = null;
        javax.portlet.RenderResponse renderResponse = null;
        javax.portlet.ResourceRequest resourceRequest = null;
        javax.portlet.ResourceResponse resourceResponse = null;
        actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
        actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
        eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
        eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
        portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
        portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
        portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                .findAttribute("portletPreferences");
        portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
        portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
        portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
        renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
        renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
        resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
        resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                .findAttribute("resourceResponse");
        out.write('\n');
        out.write('\n');

        WindowState windowState = null;
        PortletMode portletMode = null;

        PortletURL currentURLObj = null;

        if (renderRequest != null) {
            windowState = renderRequest.getWindowState();
            portletMode = renderRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(renderRequest, renderResponse);
        } else if (resourceRequest != null) {
            windowState = resourceRequest.getWindowState();
            portletMode = resourceRequest.getPortletMode();

            currentURLObj = PortletURLUtil.getCurrent(resourceRequest, resourceResponse);
        }

        String currentURL = currentURLObj.toString();
        //String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library is distributed in the hope that it will be useful, but WITHOUT
         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        PortalPreferences portalPrefs = PortletPreferencesFactoryUtil.getPortalPreferences(request);

        Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
        Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);

        out.write('\n');
        out.write('\n');

        Element el = (Element) request.getAttribute(WebKeys.JOURNAL_STRUCTURE_EL);

        String elName = JS.decodeURIComponent(el.attributeValue("name", StringPool.BLANK));
        String elType = JS.decodeURIComponent(el.attributeValue("type", StringPool.BLANK));
        String elIndexType = JS.decodeURIComponent(el.attributeValue("index-type", StringPool.BLANK));
        boolean repeatable = GetterUtil.getBoolean(el.attributeValue("repeatable"));

        String elMetadataXML = StringPool.BLANK;

        Element metaDataEl = el.element("meta-data");

        if (metaDataEl != null) {
            elMetadataXML = metaDataEl.asXML();
        }

        String parentElType = java.net.URLDecoder
                .decode(el.getParent().attributeValue("type", StringPool.BLANK));

        IntegerWrapper count = (IntegerWrapper) request.getAttribute(WebKeys.JOURNAL_STRUCTURE_EL_COUNT);
        Integer depth = (Integer) request.getAttribute(WebKeys.JOURNAL_STRUCTURE_EL_DEPTH);
        Boolean hasSiblings = (Boolean) request.getAttribute(WebKeys.JOURNAL_STRUCTURE_EL_SIBLINGS);
        IntegerWrapper tabIndex = (IntegerWrapper) request.getAttribute(WebKeys.TAB_INDEX);

        String className = "portlet-section-alternate results-row alt";

        if (MathUtil.isEven(count.getValue())) {
            className = "portlet-section-body results-row";
        }

        out.write("\n");
        out.write("\n");
        out.write("<tr class=\"");
        out.print(className);
        out.write("\">\n");
        out.write("\t<td>\n");
        out.write("\t\t<input id=\"");
        if (_jspx_meth_portlet_005fnamespace_005f0(_jspx_page_context))
            return;
        out.write("structure_el");
        out.print(count.getValue());
        out.write("_depth\" type=\"hidden\" value=\"");
        out.print(depth);
        out.write("\" />\n");
        out.write("\t\t<input id=\"");
        if (_jspx_meth_portlet_005fnamespace_005f1(_jspx_page_context))
            return;
        out.write("structure_el");
        out.print(count.getValue());
        out.write("_metadata_xml\" type=\"hidden\" value=\"");
        out.print(HttpUtil.encodeURL(elMetadataXML));
        out.write("\" />\n");
        out.write("\n");
        out.write("\t\t<table class=\"lfr-table\">\n");
        out.write("\t\t<tr>\n");
        out.write("\t\t\t");
        //  c:if
        org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
        _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fif_005f0.setParent(null);
        // /html/portlet/journal/edit_structure_xsd_el.jsp(56,3) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fif_005f0.setTest(depth.intValue() > 0);
        int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
        if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t\t\t\t<td><img border=\"0\" height=\"1\" hspace=\"0\" src=\"");
                out.print(themeDisplay.getPathThemeImages());
                out.write("/spacer.png\" vspace=\"0\" width=\"");
                out.print(depth.intValue() * 50);
                out.write("\" /></td>\n");
                out.write("\t\t\t");
                int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
        out.write("\n");
        out.write("\n");
        out.write("\t\t\t<td>\n");
        out.write("\t\t\t\t<input id=\"");
        if (_jspx_meth_portlet_005fnamespace_005f2(_jspx_page_context))
            return;
        out.write("structure_el");
        out.print(count.getValue());
        out.write("_name\" tabindex=\"");
        out.print(tabIndex.getValue());
        out.write("\" type=\"text\" size=\"20\" value=\"");
        out.print(elName);
        out.write("\" />\n");
        out.write("\t\t\t</td>\n");
        out.write("\t\t\t<td>\n");
        out.write("\t\t\t\t");
        //  c:choose
        org.apache.taglibs.standard.tag.common.core.ChooseTag _jspx_th_c_005fchoose_005f0 = (org.apache.taglibs.standard.tag.common.core.ChooseTag) _005fjspx_005ftagPool_005fc_005fchoose
                .get(org.apache.taglibs.standard.tag.common.core.ChooseTag.class);
        _jspx_th_c_005fchoose_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fchoose_005f0.setParent(null);
        int _jspx_eval_c_005fchoose_005f0 = _jspx_th_c_005fchoose_005f0.doStartTag();
        if (_jspx_eval_c_005fchoose_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t\t\t\t\t");
                //  c:when
                org.apache.taglibs.standard.tag.rt.core.WhenTag _jspx_th_c_005fwhen_005f0 = (org.apache.taglibs.standard.tag.rt.core.WhenTag) _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest
                        .get(org.apache.taglibs.standard.tag.rt.core.WhenTag.class);
                _jspx_th_c_005fwhen_005f0.setPageContext(_jspx_page_context);
                _jspx_th_c_005fwhen_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0);
                // /html/portlet/journal/edit_structure_xsd_el.jsp(65,5) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_c_005fwhen_005f0
                        .setTest(parentElType.equals("list") || parentElType.equals("multi-list"));
                int _jspx_eval_c_005fwhen_005f0 = _jspx_th_c_005fwhen_005f0.doStartTag();
                if (_jspx_eval_c_005fwhen_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                    do {
                        out.write("\n");
                        out.write("\t\t\t\t\t\t<input id=\"");
                        if (_jspx_meth_portlet_005fnamespace_005f3(_jspx_th_c_005fwhen_005f0,
                                _jspx_page_context))
                            return;
                        out.write("structure_el");
                        out.print(count.getValue());
                        out.write("_type\" tabindex=\"");
                        out.print(tabIndex.getValue());
                        out.write("\" type=\"text\" size=\"20\" value=\"");
                        out.print(elType);
                        out.write("\" />\n");
                        out.write("\t\t\t\t\t");
                        int evalDoAfterBody = _jspx_th_c_005fwhen_005f0.doAfterBody();
                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                            break;
                    } while (true);
                }
                if (_jspx_th_c_005fwhen_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f0);
                    return;
                }
                _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f0);
                out.write("\n");
                out.write("\t\t\t\t\t");
                //  c:otherwise
                org.apache.taglibs.standard.tag.common.core.OtherwiseTag _jspx_th_c_005fotherwise_005f0 = (org.apache.taglibs.standard.tag.common.core.OtherwiseTag) _005fjspx_005ftagPool_005fc_005fotherwise
                        .get(org.apache.taglibs.standard.tag.common.core.OtherwiseTag.class);
                _jspx_th_c_005fotherwise_005f0.setPageContext(_jspx_page_context);
                _jspx_th_c_005fotherwise_005f0
                        .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0);
                int _jspx_eval_c_005fotherwise_005f0 = _jspx_th_c_005fotherwise_005f0.doStartTag();
                if (_jspx_eval_c_005fotherwise_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                    do {
                        out.write("\n");
                        out.write("\t\t\t\t\t\t");
                        //  aui:column
                        com.liferay.taglib.aui.ColumnTag _jspx_th_aui_005fcolumn_005f0 = (com.liferay.taglib.aui.ColumnTag) _005fjspx_005ftagPool_005faui_005fcolumn
                                .get(com.liferay.taglib.aui.ColumnTag.class);
                        _jspx_th_aui_005fcolumn_005f0.setPageContext(_jspx_page_context);
                        _jspx_th_aui_005fcolumn_005f0
                                .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fotherwise_005f0);
                        int _jspx_eval_aui_005fcolumn_005f0 = _jspx_th_aui_005fcolumn_005f0.doStartTag();
                        if (_jspx_eval_aui_005fcolumn_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                            if (_jspx_eval_aui_005fcolumn_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.pushBody();
                                _jspx_th_aui_005fcolumn_005f0
                                        .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                _jspx_th_aui_005fcolumn_005f0.doInitBody();
                            }
                            do {
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t<select id=\"");
                                if (_jspx_meth_portlet_005fnamespace_005f4(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("structure_el");
                                out.print(count.getValue());
                                out.write("_type\" tabindex=\"");
                                out.print(tabIndex.getValue());
                                out.write("\">\n");
                                out.write("\t\t\t\t\t\t\t\t<option value=\"\"></option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("text") ? "selected" : "");
                                out.write(" value=\"text\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f0(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("text_box") ? "selected" : "");
                                out.write(" value=\"text_box\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f1(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("text_area") ? "selected" : "");
                                out.write(" value=\"text_area\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f2(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("image") ? "selected" : "");
                                out.write(" value=\"image\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f3(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("image_gallery") ? "selected" : "");
                                out.write(" value=\"image_gallery\">");
                                out.print(PortalUtil.getPortletTitle(PortletKeys.IMAGE_GALLERY, user));
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("document_library") ? "selected" : "");
                                out.write(" value=\"document_library\">");
                                out.print(PortalUtil.getPortletTitle(PortletKeys.DOCUMENT_LIBRARY, user));
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("boolean") ? "selected" : "");
                                out.write(" value=\"boolean\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f4(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("list") ? "selected" : "");
                                out.write(" value=\"list\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f5(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("multi-list") ? "selected" : "");
                                out.write(" value=\"multi-list\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f6(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elType.equals("link_to_layout") ? "selected" : "");
                                out.write(" value=\"link_to_layout\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f7(_jspx_th_aui_005fcolumn_005f0,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t</select>\n");
                                out.write("\t\t\t\t\t\t");
                                int evalDoAfterBody = _jspx_th_aui_005fcolumn_005f0.doAfterBody();
                                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                    break;
                            } while (true);
                            if (_jspx_eval_aui_005fcolumn_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.popBody();
                            }
                        }
                        if (_jspx_th_aui_005fcolumn_005f0
                                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005faui_005fcolumn.reuse(_jspx_th_aui_005fcolumn_005f0);
                            return;
                        }
                        _005fjspx_005ftagPool_005faui_005fcolumn.reuse(_jspx_th_aui_005fcolumn_005f0);
                        out.write("\n");
                        out.write("\n");
                        out.write("\t\t\t\t\t\t");
                        //  aui:column
                        com.liferay.taglib.aui.ColumnTag _jspx_th_aui_005fcolumn_005f1 = (com.liferay.taglib.aui.ColumnTag) _005fjspx_005ftagPool_005faui_005fcolumn
                                .get(com.liferay.taglib.aui.ColumnTag.class);
                        _jspx_th_aui_005fcolumn_005f1.setPageContext(_jspx_page_context);
                        _jspx_th_aui_005fcolumn_005f1
                                .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fotherwise_005f0);
                        int _jspx_eval_aui_005fcolumn_005f1 = _jspx_th_aui_005fcolumn_005f1.doStartTag();
                        if (_jspx_eval_aui_005fcolumn_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                            if (_jspx_eval_aui_005fcolumn_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.pushBody();
                                _jspx_th_aui_005fcolumn_005f1
                                        .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                _jspx_th_aui_005fcolumn_005f1.doInitBody();
                            }
                            do {
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t<select id=\"");
                                if (_jspx_meth_portlet_005fnamespace_005f5(_jspx_th_aui_005fcolumn_005f1,
                                        _jspx_page_context))
                                    return;
                                out.write("structure_el");
                                out.print(count.getValue());
                                out.write("_index_type\">\n");
                                out.write("\t\t\t\t\t\t\t\t<option value=\"\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f8(_jspx_th_aui_005fcolumn_005f1,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elIndexType.equals("keyword") ? "selected" : "");
                                out.write(" value=\"keyword\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f9(_jspx_th_aui_005fcolumn_005f1,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t<option ");
                                out.print(elIndexType.equals("text") ? "selected" : "");
                                out.write(" value=\"text\">");
                                if (_jspx_meth_liferay_002dui_005fmessage_005f10(_jspx_th_aui_005fcolumn_005f1,
                                        _jspx_page_context))
                                    return;
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t</select>\n");
                                out.write("\t\t\t\t\t\t");
                                int evalDoAfterBody = _jspx_th_aui_005fcolumn_005f1.doAfterBody();
                                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                    break;
                            } while (true);
                            if (_jspx_eval_aui_005fcolumn_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                out = _jspx_page_context.popBody();
                            }
                        }
                        if (_jspx_th_aui_005fcolumn_005f1
                                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                            _005fjspx_005ftagPool_005faui_005fcolumn.reuse(_jspx_th_aui_005fcolumn_005f1);
                            return;
                        }
                        _005fjspx_005ftagPool_005faui_005fcolumn.reuse(_jspx_th_aui_005fcolumn_005f1);
                        out.write("\n");
                        out.write("\t\t\t\t\t");
                        int evalDoAfterBody = _jspx_th_c_005fotherwise_005f0.doAfterBody();
                        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                            break;
                    } while (true);
                }
                if (_jspx_th_c_005fotherwise_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
                    return;
                }
                _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
                out.write("\n");
                out.write("\t\t\t\t");
                int evalDoAfterBody = _jspx_th_c_005fchoose_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fchoose_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fchoose.reuse(_jspx_th_c_005fchoose_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fchoose.reuse(_jspx_th_c_005fchoose_005f0);
        out.write("\n");
        out.write("\t\t\t</td>\n");
        out.write("\n");
        out.write("\t\t\t");
        //  c:if
        org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
        _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context);
        _jspx_th_c_005fif_005f1.setParent(null);
        // /html/portlet/journal/edit_structure_xsd_el.jsp(96,3) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fif_005f1.setTest(!parentElType.equals("list") && !parentElType.equals("multi-list"));
        int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag();
        if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t\t\t\t<td>\n");
                out.write("\t\t\t\t\t<input ");
                out.print(repeatable ? "checked" : "");
                out.write(" id=\"");
                if (_jspx_meth_portlet_005fnamespace_005f6(_jspx_th_c_005fif_005f1, _jspx_page_context))
                    return;
                out.write("structure_el");
                out.print(count.getValue());
                out.write("_repeatable\" tabindex=\"");
                out.print(tabIndex.getValue());
                out.write("\" type=\"checkbox\" /> ");
                if (_jspx_meth_liferay_002dui_005fmessage_005f11(_jspx_th_c_005fif_005f1, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("\t\t\t\t</td>\n");
                out.write("\t\t\t\t<td>\n");
                out.write("\n");
                out.write("\t\t\t\t\t");

                String taglibAddURL = "javascript:" + renderResponse.getNamespace() + "editElement('add', "
                        + count.getValue() + ");";

                out.write("\n");
                out.write("\n");
                out.write("\t\t\t\t\t");
                //  liferay-ui:icon
                com.liferay.taglib.ui.IconTag _jspx_th_liferay_002dui_005ficon_005f0 = (com.liferay.taglib.ui.IconTag) _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .get(com.liferay.taglib.ui.IconTag.class);
                _jspx_th_liferay_002dui_005ficon_005f0.setPageContext(_jspx_page_context);
                _jspx_th_liferay_002dui_005ficon_005f0
                        .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f1);
                // /html/portlet/journal/edit_structure_xsd_el.jsp(106,5) name = image type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f0.setImage("../arrows/01_plus");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(106,5) name = message type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f0.setMessage("add");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(106,5) name = url type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f0.setUrl(taglibAddURL);
                int _jspx_eval_liferay_002dui_005ficon_005f0 = _jspx_th_liferay_002dui_005ficon_005f0
                        .doStartTag();
                if (_jspx_th_liferay_002dui_005ficon_005f0
                        .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                            .reuse(_jspx_th_liferay_002dui_005ficon_005f0);
                    return;
                }
                _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .reuse(_jspx_th_liferay_002dui_005ficon_005f0);
                out.write("\n");
                out.write("\t\t\t\t</td>\n");
                out.write("\t\t\t");
                int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
        out.write("\n");
        out.write("\n");
        out.write("\t\t\t");
        //  c:if
        org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f2 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
        _jspx_th_c_005fif_005f2.setPageContext(_jspx_page_context);
        _jspx_th_c_005fif_005f2.setParent(null);
        // /html/portlet/journal/edit_structure_xsd_el.jsp(110,3) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fif_005f2.setTest(el.elements().isEmpty());
        int _jspx_eval_c_005fif_005f2 = _jspx_th_c_005fif_005f2.doStartTag();
        if (_jspx_eval_c_005fif_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t\t\t\t<td>\n");
                out.write("\n");
                out.write("\t\t\t\t\t");

                String taglibRemoveURL = "javascript:" + renderResponse.getNamespace()
                        + "editElement('remove', " + count.getValue() + ");";

                out.write("\n");
                out.write("\n");
                out.write("\t\t\t\t\t");
                //  liferay-ui:icon
                com.liferay.taglib.ui.IconTag _jspx_th_liferay_002dui_005ficon_005f1 = (com.liferay.taglib.ui.IconTag) _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .get(com.liferay.taglib.ui.IconTag.class);
                _jspx_th_liferay_002dui_005ficon_005f1.setPageContext(_jspx_page_context);
                _jspx_th_liferay_002dui_005ficon_005f1
                        .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f2);
                // /html/portlet/journal/edit_structure_xsd_el.jsp(117,5) name = image type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f1.setImage("../arrows/01_minus");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(117,5) name = message type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f1.setMessage("remove");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(117,5) name = url type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f1.setUrl(taglibRemoveURL);
                int _jspx_eval_liferay_002dui_005ficon_005f1 = _jspx_th_liferay_002dui_005ficon_005f1
                        .doStartTag();
                if (_jspx_th_liferay_002dui_005ficon_005f1
                        .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                            .reuse(_jspx_th_liferay_002dui_005ficon_005f1);
                    return;
                }
                _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .reuse(_jspx_th_liferay_002dui_005ficon_005f1);
                out.write("\n");
                out.write("\t\t\t\t</td>\n");
                out.write("\t\t\t");
                int evalDoAfterBody = _jspx_th_c_005fif_005f2.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fif_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2);
        out.write("\n");
        out.write("\n");
        out.write("\t\t\t");
        //  c:if
        org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f3 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
        _jspx_th_c_005fif_005f3.setPageContext(_jspx_page_context);
        _jspx_th_c_005fif_005f3.setParent(null);
        // /html/portlet/journal/edit_structure_xsd_el.jsp(121,3) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fif_005f3.setTest(hasSiblings.booleanValue());
        int _jspx_eval_c_005fif_005f3 = _jspx_th_c_005fif_005f3.doStartTag();
        if (_jspx_eval_c_005fif_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t\t\t\t<td>\n");
                out.write("\t\t\t\t\t");
                //  liferay-ui:icon
                com.liferay.taglib.ui.IconTag _jspx_th_liferay_002dui_005ficon_005f2 = (com.liferay.taglib.ui.IconTag) _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .get(com.liferay.taglib.ui.IconTag.class);
                _jspx_th_liferay_002dui_005ficon_005f2.setPageContext(_jspx_page_context);
                _jspx_th_liferay_002dui_005ficon_005f2
                        .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f3);
                // /html/portlet/journal/edit_structure_xsd_el.jsp(123,5) name = image type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f2.setImage("../arrows/01_up");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(123,5) name = message type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f2.setMessage("up");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(123,5) name = url type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f2.setUrl("javascript:" + renderResponse.getNamespace()
                        + "moveElement(true, " + count.getValue() + ");");
                int _jspx_eval_liferay_002dui_005ficon_005f2 = _jspx_th_liferay_002dui_005ficon_005f2
                        .doStartTag();
                if (_jspx_th_liferay_002dui_005ficon_005f2
                        .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                            .reuse(_jspx_th_liferay_002dui_005ficon_005f2);
                    return;
                }
                _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .reuse(_jspx_th_liferay_002dui_005ficon_005f2);
                out.write("\n");
                out.write("\t\t\t\t</td>\n");
                out.write("\t\t\t\t<td>\n");
                out.write("\t\t\t\t\t");
                //  liferay-ui:icon
                com.liferay.taglib.ui.IconTag _jspx_th_liferay_002dui_005ficon_005f3 = (com.liferay.taglib.ui.IconTag) _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .get(com.liferay.taglib.ui.IconTag.class);
                _jspx_th_liferay_002dui_005ficon_005f3.setPageContext(_jspx_page_context);
                _jspx_th_liferay_002dui_005ficon_005f3
                        .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f3);
                // /html/portlet/journal/edit_structure_xsd_el.jsp(126,5) name = image type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f3.setImage("../arrows/01_down");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(126,5) name = message type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f3.setMessage("down");
                // /html/portlet/journal/edit_structure_xsd_el.jsp(126,5) name = url type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                _jspx_th_liferay_002dui_005ficon_005f3.setUrl("javascript:" + renderResponse.getNamespace()
                        + "moveElement(false, " + count.getValue() + ");");
                int _jspx_eval_liferay_002dui_005ficon_005f3 = _jspx_th_liferay_002dui_005ficon_005f3
                        .doStartTag();
                if (_jspx_th_liferay_002dui_005ficon_005f3
                        .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                    _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                            .reuse(_jspx_th_liferay_002dui_005ficon_005f3);
                    return;
                }
                _005fjspx_005ftagPool_005fliferay_002dui_005ficon_0026_005furl_005fmessage_005fimage_005fnobody
                        .reuse(_jspx_th_liferay_002dui_005ficon_005f3);
                out.write("\n");
                out.write("\t\t\t\t</td>\n");
                out.write("\t\t\t");
                int evalDoAfterBody = _jspx_th_c_005fif_005f3.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fif_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f3);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f3);
        out.write("\n");
        out.write("\t\t</tr>\n");
        out.write("\t\t</table>\n");
        out.write("\t</td>\n");
        out.write("</tr>\n");
        out.write("\n");

        tabIndex.setValue(tabIndex.getValue() + 2);

    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}