principalbrowse_jsp.java 7.63 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.day.crx.i18n.Dictionary
 *  javax.jcr.Session
 *  javax.servlet.Servlet
 *  javax.servlet.ServletConfig
 *  javax.servlet.ServletContext
 *  javax.servlet.ServletException
 *  javax.servlet.ServletRequest
 *  javax.servlet.ServletResponse
 *  javax.servlet.http.HttpServletRequest
 *  javax.servlet.http.HttpServletResponse
 *  javax.servlet.jsp.JspFactory
 *  javax.servlet.jsp.JspWriter
 *  javax.servlet.jsp.PageContext
 *  javax.servlet.jsp.SkipPageException
 *  org.apache.commons.lang3.StringEscapeUtils
 *  org.apache.jasper.runtime.HttpJspBase
 *  org.apache.jasper.runtime.JspSourceDependent
 */
package com.day.crx.explorer.impl.jsp.ui;

import com.day.crx.explorer.impl.j2ee.CRXContext;
import com.day.crx.explorer.impl.util.RequestData;
import com.day.crx.i18n.Dictionary;
import java.io.IOException;
import java.util.List;
import javax.jcr.Session;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspFactory;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.SkipPageException;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.jasper.runtime.HttpJspBase;
import org.apache.jasper.runtime.JspSourceDependent;

public final class principalbrowse_jsp
extends HttpJspBase
implements JspSourceDependent {
    private static List _jspx_dependants;

    public Object getDependants() {
        return _jspx_dependants;
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        CRXContext ctx;
        PageContext _jspx_page_context;
        JspFactory _jspxFactory;
        JspWriter _jspx_out;
        JspWriter out;
        block10 : {
            _jspxFactory = null;
            PageContext pageContext = null;
            out = null;
            _jspx_out = null;
            _jspx_page_context = null;
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html");
            _jspx_page_context = pageContext = _jspxFactory.getPageContext((Servlet)this, (ServletRequest)request, (ServletResponse)response, null, false, 8192, true);
            pageContext.getServletContext();
            pageContext.getServletConfig();
            _jspx_out = out = pageContext.getOut();
            response.setContentType("text/html; charset=utf-8");
            ctx = CRXContext.getInstance(pageContext, request);
            Session repSession = ctx.getSession();
            if (repSession != null) break block10;
            if (_jspxFactory == null) return;
            _jspxFactory.releasePageContext(_jspx_page_context);
            return;
        }
        try {
            String docroot = ctx.getDocroot();
            RequestData req = ctx.getRequestData();
            Dictionary dict = ctx.getCurrentDictionary();
            String parent = request.getRequestURI();
            if (parent.length() > 1) {
                parent = parent.substring(0, parent.lastIndexOf(47));
            }
            out.write("<html><head><title>");
            out.print(dict.msg("crex.principal_browser.tit"));
            out.write("</title>\n<script type=\"text/javascript\" src=\"");
            out.print(docroot);
            out.write("/ui/util.js\"></script>\n<style type=\"text/css\">\n\nIFRAME.iframeset\n\t{\n        border:1px solid #e8e9ec;\n        height:275px;\n        width:205px;\n        margin-left:12px;\n        margin-right:12px;\n\t}\nINPUT.radio {\n      margin-right:3px;\n      vertical-align:top;\n      }\n\n</style>\n<script type=\"text/javascript\">\nwindow.returnValue = \"\";\n\nfunction okDialog() {\n    if (window.opener) {\n    \tvar elem = window.opener.document.getElementById(\"");
            out.print(StringEscapeUtils.escapeEcmaScript((String)req.getParameter("TargetControlId")));
            out.write("\");\n        if (elem) {\n            elem.value = window.returnValue;\n        }\n    }\n    window.close();\n}\nfunction cancelDialog() {\n    window.returnValue = \"\";\n    window.close();\n}\n\nfunction setPrincipal(name, isGroup) {\n    var returnGroupInfo = ");
            out.print("true".equals(req.getParameter("IncludeGroupInfo")));
            out.write(";\n    if (returnGroupInfo) {\n        window.returnValue = (isGroup) ? name + \"_\" + isGroup : name;\n    } else {\n        window.returnValue = name;\n    }\n    var obj = document.getElementById(\"selectButton\");\n    obj.disabled = false;\n}\n\n</script>\n<link rel=\"stylesheet\" href=\"");
            out.print(docroot);
            out.write("/ui/default.css\" type=\"text/css\" title=\"style\" />\n\n</head>\n<body style=\"background-color:#e8e9ec\">\n    <form name=\"principalSearch\" action=\"");
            out.print(docroot);
            out.write("/ui/principalbrowse_list.jsp\" target=\"result\">\n        <table width=\"250\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" style=\"margin:12px;\" >\n            <tr>\n                <td>Name:</td><td><input type=\"text\" name=\"query\" value=\"\" size=\"22\"></td>\n            </tr>\n            <tr>\n                <td>Category:</td><td vAlign=\"top\"><input class=\"radio\" type=\"radio\" name=\"category\" value=\"group\" checked >");
            out.print(dict.msg("crex.group.lab"));
            out.write("<input class=\"radio\" type=\"radio\" name=\"category\" value=\"user\">");
            out.print(dict.msg("crex.user.lab"));
            out.write("&nbsp;</td>\n            </tr>\n            <tr>\n                 <td></td><td><input type=\"submit\" value=\"");
            out.print(dict.msg("crex.search_now.tit"));
            out.write("\"></td>\n            </tr>\n        </table>\n        <input type=\"hidden\" name=\"");
            out.print("FormEncoding");
            out.write("\" value=\"");
            out.print(response.getCharacterEncoding());
            out.write("\">\n    </form>\n    <iframe src=\"");
            out.print(docroot);
            out.write("/ui/principalbrowse_list.jsp?ck=");
            out.print(System.currentTimeMillis());
            out.write("\" name=\"result\" frameborder=\"no\" class=\"iframeset\" >\n    </iframe>\n    <div style=\"width:225px;text-align:right;padding:5px;\"><input disabled type=\"button\" id=\"selectButton\" value=\"");
            out.print(dict.msg("crex.select.lab"));
            out.write("\" onClick=\"okDialog()\"><input type=\"button\" value=\"");
            out.print(dict.msg("crex.cancel.lab"));
            out.write("\" onClick=\"cancelDialog()\"></div>\n</body>\n</html>\n");
            return;
        }
        catch (Throwable t) {
            try {
                if (t instanceof SkipPageException) return;
                out = _jspx_out;
                if (out != null && out.getBufferSize() != 0) {
                    out.clearBuffer();
                }
                if (_jspx_page_context == null) return;
                _jspx_page_context.handlePageException(t);
                return;
            }
            catch (Throwable throwable) {
                throw throwable;
            }
            finally {
                if (_jspxFactory != null) {
                    _jspxFactory.releasePageContext(_jspx_page_context);
                }
            }
        }
    }
}