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

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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.
       *
       * <p>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');

      String name = GetterUtil.getString((String) request.getAttribute("aui:form:name"));
      String onSubmit = GetterUtil.getString((String) request.getAttribute("aui:form:onSubmit"));

      out.write("\n");
      out.write("\n");
      out.write("</form>\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/aui/form/end.jsp(26,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-form");
      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("\tLiferay.Form.register(\n");
          out.write("\t\t{\n");
          out.write("\t\t\tid: '");
          out.print(namespace + name);
          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_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_aui_005fscript_005f0);
          // /html/taglib/aui/form/end.jsp(31,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(Validator.isNotNull(onSubmit));
          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, onSubmit: function(event) {\n");
              out.write("\t\t\t\t\t");
              out.print(onSubmit);
              out.write("\n");
              out.write("\t\t\t\t}\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("\t\t}\n");
          out.write("\t);\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);
    }
  }
Example #2
0
  protected int processEndTag() throws Exception {
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

    IntegerWrapper iconCount =
        (IntegerWrapper) request.getAttribute("liferay-ui:icon-menu:icon-count");

    request.removeAttribute("liferay-ui:icon-menu:icon-count");

    Boolean singleIcon = (Boolean) request.getAttribute("liferay-ui:icon-menu:single-icon");

    request.removeAttribute("liferay-ui:icon-menu:single-icon");

    JspWriter jspWriter = pageContext.getOut();

    if ((iconCount != null)
        && (iconCount.getValue() >= 1)
        && ((singleIcon == null) || _showWhenSingleIcon)) {

      if (!FileAvailabilityUtil.isAvailable(pageContext.getServletContext(), getStartPage())) {

        if (_showExpanded) {
          jspWriter.write("<div class=\"lfr-component ");
          jspWriter.write("lfr-menu-list lfr-menu-expanded align-");
          jspWriter.write(_align);
          jspWriter.write(" ");
          jspWriter.print(_cssClass);
          jspWriter.write("\" id=\"");
          jspWriter.write(_id);
          jspWriter.write("\">");
        } else {
          jspWriter.write("<span title=\"");
          jspWriter.write(LanguageUtil.get(pageContext, _message));
          jspWriter.write("\"><ul class='lfr-component lfr-actions ");
          jspWriter.write("align-");
          jspWriter.write(_align);
          jspWriter.write(" direction-");
          jspWriter.write(_direction);
          jspWriter.write(" max-display-items-");
          jspWriter.write(String.valueOf(_maxDisplayItems));
          jspWriter.write(" ");

          if (Validator.isNotNull(_cssClass)) {
            jspWriter.print(_cssClass);
          }

          if (_disabled) {
            jspWriter.write(" disabled");
          }

          if (_extended) {
            jspWriter.write(" lfr-extended");
          }

          if (_showArrow) {
            jspWriter.write(" show-arrow");
          }

          jspWriter.write("\' id=\"");
          jspWriter.write(_id);
          jspWriter.write("\">");
          jspWriter.write("<li class=\"lfr-trigger\"><strong>");
          jspWriter.write("<a class=\"nobr\" href=\"javascript:;\">");

          if (Validator.isNotNull(_icon)) {
            jspWriter.write("<img alt=\"\" src=\"");
            jspWriter.write(_icon);
            jspWriter.write("\" />");
          }

          jspWriter.write("<span class=\"taglib-text\">");
          jspWriter.write(LanguageUtil.get(pageContext, _message));
          jspWriter.write("</span></a></strong>");
        }

        jspWriter.write("<ul>");
      } else {
        PortalIncludeUtil.include(pageContext, getStartPage());
      }
    }

    writeBodyContent(jspWriter);

    if ((iconCount != null)
        && (iconCount.getValue() >= 1)
        && ((singleIcon == null) || _showWhenSingleIcon)) {

      if (!FileAvailabilityUtil.isAvailable(pageContext.getServletContext(), getEndPage())) {

        jspWriter.write("</ul>");

        if (_showExpanded) {
          jspWriter.write("</div>");

          ScriptTag.doTag(
              null, "liferay-menu", "Liferay.Menu.handleFocus('#" + _id + "menu');", pageContext);
        } else {
          jspWriter.write("</li></ul></span>");
        }
      } else {
        PortalIncludeUtil.include(pageContext, getEndPage());
      }
    }

    request.removeAttribute("liferay-ui:icon-menu:showWhenSingleIcon");

    return EVAL_PAGE;
  }