/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: JspC/ApacheTomcat9
 * Generated at: 2026-03-15 20:33:17 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp.gallery.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class mediaPhotoEdit_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent,
                 org.apache.jasper.runtime.JspSourceImports {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  static {
    _jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(12);
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/silverpeas/core/silverpeas-core-web/6.5-build260315/silverpeas-core-web-6.5-build260315.jar!/META-INF/viewGenerator.tld", Long.valueOf(1773603576000L));
    _jspx_dependants.put("/WEB-INF/tags/silverpeas/gallery/browseBar.tag", Long.valueOf(1705522060928L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar!/META-INF/fn.tld", Long.valueOf(1531470420000L));
    _jspx_dependants.put("/WEB-INF/tags/silverpeas/gallery/editMediaLayout.tag", Long.valueOf(1705522060928L));
    _jspx_dependants.put("file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar", Long.valueOf(1531448975000L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar!/META-INF/c.tld", Long.valueOf(1531470420000L));
    _jspx_dependants.put("/WEB-INF/tags/silverpeas/gallery/editMedia.tag", Long.valueOf(1705522060928L));
    _jspx_dependants.put("/WEB-INF/tags/silverpeas/gallery/handleMediaPreview.tag", Long.valueOf(1705522060928L));
    _jspx_dependants.put("file:/home/silverbuild/.m2/repository/org/silverpeas/core/silverpeas-core-web/6.5-build260315/silverpeas-core-web-6.5-build260315.jar", Long.valueOf(1773603598850L));
    _jspx_dependants.put("/WEB-INF/tags/silverpeas/gallery/displayMediaMetadata.tag", Long.valueOf(1705522060928L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/silverpeas/core/silverpeas-core-web/6.5-build260315/silverpeas-core-web-6.5-build260315.jar!/META-INF/silverFunctions.tld", Long.valueOf(1773603576000L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar!/META-INF/fmt.tld", Long.valueOf(1531470420000L));
  }

  private static final java.util.Set<java.lang.String> _jspx_imports_packages;

  private static final java.util.Set<java.lang.String> _jspx_imports_classes;

  static {
    _jspx_imports_packages = new java.util.LinkedHashSet<>(4);
    _jspx_imports_packages.add("javax.servlet");
    _jspx_imports_packages.add("javax.servlet.http");
    _jspx_imports_packages.add("javax.servlet.jsp");
    _jspx_imports_classes = null;
  }

  private volatile javax.el.ExpressionFactory _el_expressionfactory;
  private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public java.util.Set<java.lang.String> getPackageImports() {
    return _jspx_imports_packages;
  }

  public java.util.Set<java.lang.String> getClassImports() {
    return _jspx_imports_classes;
  }

  public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
    if (_el_expressionfactory == null) {
      synchronized (this) {
        if (_el_expressionfactory == null) {
          _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        }
      }
    }
    return _el_expressionfactory;
  }

  public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
    if (_jsp_instancemanager == null) {
      synchronized (this) {
        if (_jsp_instancemanager == null) {
          _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
        }
      }
    }
    return _jsp_instancemanager;
  }

  public void _jspInit() {
  }

  public void _jspDestroy() {
  }

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

    if (!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
      final java.lang.String _jspx_method = request.getMethod();
      if ("OPTIONS".equals(_jspx_method)) {
        response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
        return;
      }
      if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method)) {
        response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
        response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
        return;
      }
    }

    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 {
      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\n\n\n\n\n\n\n");
      if (_jspx_meth_view_005fsetConstant_005f0(_jspx_page_context))
        return;
      out.write('\n');
      if (_jspx_meth_view_005fsetConstant_005f1(_jspx_page_context))
        return;
      out.write('\n');
      if (_jspx_meth_view_005fsetConstant_005f2(_jspx_page_context))
        return;
      out.write('\n');
      if (_jspx_meth_view_005fsetConstant_005f3(_jspx_page_context))
        return;
      out.write('\n');
      out.write('\n');
      if (_jspx_meth_c_005fset_005f0(_jspx_page_context))
        return;
      out.write('\n');
      out.write('\n');
      if (_jspx_meth_gallery_005feditMediaLayout_005f0(_jspx_page_context))
        return;
    } 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);
    }
  }

  private boolean _jspx_meth_view_005fsetConstant_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  view:setConstant
    org.silverpeas.core.web.jstl.constant.SetConstantTag _jspx_th_view_005fsetConstant_005f0 = new org.silverpeas.core.web.jstl.constant.SetConstantTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_view_005fsetConstant_005f0);
    _jspx_th_view_005fsetConstant_005f0.setPageContext(_jspx_page_context);
    _jspx_th_view_005fsetConstant_005f0.setParent(null);
    // /gallery/jsp/mediaPhotoEdit.jsp(33,0) name = var type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f0.setVar("mediaType");
    // /gallery/jsp/mediaPhotoEdit.jsp(33,0) name = constant type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f0.setConstant("org.silverpeas.components.gallery.constant.MediaType.Photo");
    int _jspx_eval_view_005fsetConstant_005f0 = _jspx_th_view_005fsetConstant_005f0.doStartTag();
    if (_jspx_th_view_005fsetConstant_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      return true;
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_view_005fsetConstant_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_view_005fsetConstant_005f1(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  view:setConstant
    org.silverpeas.core.web.jstl.constant.SetConstantTag _jspx_th_view_005fsetConstant_005f1 = new org.silverpeas.core.web.jstl.constant.SetConstantTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_view_005fsetConstant_005f1);
    _jspx_th_view_005fsetConstant_005f1.setPageContext(_jspx_page_context);
    _jspx_th_view_005fsetConstant_005f1.setParent(null);
    // /gallery/jsp/mediaPhotoEdit.jsp(34,0) name = var type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f1.setVar("supportedMediaMimeTypes");
    // /gallery/jsp/mediaPhotoEdit.jsp(34,0) name = constant type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f1.setConstant("org.silverpeas.components.gallery.constant.MediaMimeType.PHOTOS");
    int _jspx_eval_view_005fsetConstant_005f1 = _jspx_th_view_005fsetConstant_005f1.doStartTag();
    if (_jspx_th_view_005fsetConstant_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      return true;
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_view_005fsetConstant_005f1, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_view_005fsetConstant_005f2(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  view:setConstant
    org.silverpeas.core.web.jstl.constant.SetConstantTag _jspx_th_view_005fsetConstant_005f2 = new org.silverpeas.core.web.jstl.constant.SetConstantTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_view_005fsetConstant_005f2);
    _jspx_th_view_005fsetConstant_005f2.setPageContext(_jspx_page_context);
    _jspx_th_view_005fsetConstant_005f2.setParent(null);
    // /gallery/jsp/mediaPhotoEdit.jsp(35,0) name = var type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f2.setVar("PREVIEW_RESOLUTION");
    // /gallery/jsp/mediaPhotoEdit.jsp(35,0) name = constant type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f2.setConstant("org.silverpeas.components.gallery.constant.MediaResolution.PREVIEW");
    int _jspx_eval_view_005fsetConstant_005f2 = _jspx_th_view_005fsetConstant_005f2.doStartTag();
    if (_jspx_th_view_005fsetConstant_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      return true;
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_view_005fsetConstant_005f2, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_view_005fsetConstant_005f3(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  view:setConstant
    org.silverpeas.core.web.jstl.constant.SetConstantTag _jspx_th_view_005fsetConstant_005f3 = new org.silverpeas.core.web.jstl.constant.SetConstantTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_view_005fsetConstant_005f3);
    _jspx_th_view_005fsetConstant_005f3.setPageContext(_jspx_page_context);
    _jspx_th_view_005fsetConstant_005f3.setParent(null);
    // /gallery/jsp/mediaPhotoEdit.jsp(36,0) name = var type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f3.setVar("MEDIUM_RESOLUTION");
    // /gallery/jsp/mediaPhotoEdit.jsp(36,0) name = constant type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetConstant_005f3.setConstant("org.silverpeas.components.gallery.constant.MediaResolution.MEDIUM");
    int _jspx_eval_view_005fsetConstant_005f3 = _jspx_th_view_005fsetConstant_005f3.doStartTag();
    if (_jspx_th_view_005fsetConstant_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      return true;
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_view_005fsetConstant_005f3, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_c_005fset_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:set
    org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f0 = new org.apache.taglibs.standard.tag.rt.core.SetTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_c_005fset_005f0);
    _jspx_th_c_005fset_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005fset_005f0.setParent(null);
    // /gallery/jsp/mediaPhotoEdit.jsp(38,0) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fset_005f0.setVar("isViewMetadata");
    // /gallery/jsp/mediaPhotoEdit.jsp(38,0) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
    _jspx_th_c_005fset_005f0.setValue(new org.apache.jasper.el.JspValueExpression("/gallery/jsp/mediaPhotoEdit.jsp(38,0) '${requestScope.IsViewMetadata}'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${requestScope.IsViewMetadata}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
    int _jspx_eval_c_005fset_005f0 = _jspx_th_c_005fset_005f0.doStartTag();
    if (_jspx_th_c_005fset_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      return true;
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fset_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_gallery_005feditMediaLayout_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    javax.servlet.http.HttpSession session = _jspx_page_context.getSession();
    javax.servlet.ServletContext application = _jspx_page_context.getServletContext();
    javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();
    //  gallery:editMediaLayout
    org.apache.jsp.tag.web.silverpeas.gallery.editMediaLayout_tag _jspx_th_gallery_005feditMediaLayout_005f0 = new org.apache.jsp.tag.web.silverpeas.gallery.editMediaLayout_tag();
    _jsp_getInstanceManager().newInstance(_jspx_th_gallery_005feditMediaLayout_005f0);
    try {
      _jspx_th_gallery_005feditMediaLayout_005f0.setJspContext(_jspx_page_context);
      // /gallery/jsp/mediaPhotoEdit.jsp(40,0) name = mediaType type = org.silverpeas.components.gallery.constant.MediaType reqTime = true required = true fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005feditMediaLayout_005f0.setMediaType((org.silverpeas.components.gallery.constant.MediaType) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${mediaType}", org.silverpeas.components.gallery.constant.MediaType.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      // /gallery/jsp/mediaPhotoEdit.jsp(40,0) name = supportedMediaMimeTypes type = java.util.Set reqTime = true required = false fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005feditMediaLayout_005f0.setSupportedMediaMimeTypes((java.util.Set) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${supportedMediaMimeTypes}", java.util.Set.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      javax.servlet.jsp.tagext.JspFragment _jspx_temp0 = new Helper( 0, _jspx_page_context, _jspx_th_gallery_005feditMediaLayout_005f0, null);
      // /gallery/jsp/mediaPhotoEdit.jsp(40,0) name = headerBloc type = null reqTime = true required = false fragment = true deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005feditMediaLayout_005f0.setHeaderBloc(_jspx_temp0);
      javax.servlet.jsp.tagext.JspFragment _jspx_temp1 = new Helper( 1, _jspx_page_context, _jspx_th_gallery_005feditMediaLayout_005f0, null);
      // /gallery/jsp/mediaPhotoEdit.jsp(40,0) name = mediaPreviewBloc type = null reqTime = true required = true fragment = true deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005feditMediaLayout_005f0.setMediaPreviewBloc(_jspx_temp1);
      _jspx_th_gallery_005feditMediaLayout_005f0.doTag();
    } finally {
      _jsp_getInstanceManager().destroyInstance(_jspx_th_gallery_005feditMediaLayout_005f0);
    }
    return false;
  }

  private boolean _jspx_meth_c_005fif_005f0(javax.servlet.jsp.tagext.JspTag _jspx_parent, javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:if
    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = new org.apache.taglibs.standard.tag.rt.core.IfTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_c_005fif_005f0);
    _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005fif_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) _jspx_parent));
    // /gallery/jsp/mediaPhotoEdit.jsp(44,4) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fif_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${not isNewMediaCase}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
    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      ");
        if (_jspx_meth_gallery_005fhandleMediaPreview_005f0(_jspx_th_c_005fif_005f0, _jspx_page_context))
          return true;
        out.write("\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) {
      throw new javax.servlet.jsp.SkipPageException();
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_gallery_005fhandleMediaPreview_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  gallery:handleMediaPreview
    org.apache.jsp.tag.web.silverpeas.gallery.handleMediaPreview_tag _jspx_th_gallery_005fhandleMediaPreview_005f0 = new org.apache.jsp.tag.web.silverpeas.gallery.handleMediaPreview_tag();
    _jsp_getInstanceManager().newInstance(_jspx_th_gallery_005fhandleMediaPreview_005f0);
    try {
      _jspx_th_gallery_005fhandleMediaPreview_005f0.setJspContext(_jspx_page_context);
      _jspx_th_gallery_005fhandleMediaPreview_005f0.setParent(_jspx_th_c_005fif_005f0);
      // /gallery/jsp/mediaPhotoEdit.jsp(45,6) name = jquerySelector type = java.lang.String reqTime = true required = true fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005fhandleMediaPreview_005f0.setJquerySelector((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${'#photoPreview'}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      _jspx_th_gallery_005fhandleMediaPreview_005f0.doTag();
    } finally {
      _jsp_getInstanceManager().destroyInstance(_jspx_th_gallery_005fhandleMediaPreview_005f0);
    }
    return false;
  }

  private boolean _jspx_meth_c_005fout_005f0(javax.servlet.jsp.tagext.JspTag _jspx_parent, javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:out
    org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_005fout_005f0 = new org.apache.taglibs.standard.tag.rt.core.OutTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_c_005fout_005f0);
    _jspx_th_c_005fout_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005fout_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) _jspx_parent));
    // /gallery/jsp/mediaPhotoEdit.jsp(53,23) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fout_005f0.setValue((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${media.title}", java.lang.Object.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
    int _jspx_eval_c_005fout_005f0 = _jspx_th_c_005fout_005f0.doStartTag();
    if (_jspx_th_c_005fout_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      throw new javax.servlet.jsp.SkipPageException();
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fout_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_gallery_005fdisplayMediaMetadata_005f0(javax.servlet.jsp.tagext.JspTag _jspx_parent, javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  gallery:displayMediaMetadata
    org.apache.jsp.tag.web.silverpeas.gallery.displayMediaMetadata_tag _jspx_th_gallery_005fdisplayMediaMetadata_005f0 = new org.apache.jsp.tag.web.silverpeas.gallery.displayMediaMetadata_tag();
    _jsp_getInstanceManager().newInstance(_jspx_th_gallery_005fdisplayMediaMetadata_005f0);
    try {
      _jspx_th_gallery_005fdisplayMediaMetadata_005f0.setJspContext(_jspx_page_context);
      _jspx_th_gallery_005fdisplayMediaMetadata_005f0.setParent(_jspx_parent);
      // /gallery/jsp/mediaPhotoEdit.jsp(58,4) name = media type = org.silverpeas.components.gallery.model.Media reqTime = true required = true fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005fdisplayMediaMetadata_005f0.setMedia((org.silverpeas.components.gallery.model.Media) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${media}", org.silverpeas.components.gallery.model.Media.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      // /gallery/jsp/mediaPhotoEdit.jsp(58,4) name = isViewMetadata type = java.lang.Boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005fdisplayMediaMetadata_005f0.setIsViewMetadata((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${isViewMetadata}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      _jspx_th_gallery_005fdisplayMediaMetadata_005f0.doTag();
    } finally {
      _jsp_getInstanceManager().destroyInstance(_jspx_th_gallery_005fdisplayMediaMetadata_005f0);
    }
    return false;
  }

  private class Helper
      extends org.apache.jasper.runtime.JspFragmentHelper
  {
    private javax.servlet.jsp.tagext.JspTag _jspx_parent;
    private int[] _jspx_push_body_count;

    public Helper( int discriminator, javax.servlet.jsp.JspContext jspContext, javax.servlet.jsp.tagext.JspTag _jspx_parent, int[] _jspx_push_body_count ) {
      super( discriminator, jspContext, _jspx_parent );
      this._jspx_parent = _jspx_parent;
      this._jspx_push_body_count = _jspx_push_body_count;
    }
    public boolean invoke0( javax.servlet.jsp.JspWriter out ) 
      throws java.lang.Throwable
    {
      javax.servlet.http.HttpSession session = _jspx_page_context.getSession();
      javax.servlet.ServletContext application = _jspx_page_context.getServletContext();
      javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest();
      org.silverpeas.components.gallery.model.Photo media = null;
      media = (org.silverpeas.components.gallery.model.Photo) _jspx_page_context.getAttribute("media", javax.servlet.jsp.PageContext.REQUEST_SCOPE);
      if (media == null){
        throw new java.lang.InstantiationException("bean media not found within scope");
      }
      out.write("\n    ");
      java.lang.Boolean isNewMediaCase = null;
      isNewMediaCase = (java.lang.Boolean) _jspx_page_context.getAttribute("isNewMediaCase", javax.servlet.jsp.PageContext.REQUEST_SCOPE);
      if (isNewMediaCase == null){
        throw new java.lang.InstantiationException("bean isNewMediaCase not found within scope");
      }
      out.write("\n    ");
      if (_jspx_meth_c_005fif_005f0(_jspx_parent, _jspx_page_context))
        return true;
      return false;
    }
    public boolean invoke1( javax.servlet.jsp.JspWriter out ) 
      throws java.lang.Throwable
    {
      out.write("<center>\n      <div>\n        <img id=\"photoPreview\"\n             tipTitle=\"");
      if (_jspx_meth_c_005fout_005f0(_jspx_parent, _jspx_page_context))
        return true;
      out.write("\"\n             tipUrl=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${media.getApplicationThumbnailUrl(PREVIEW_RESOLUTION)}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      out.write("\"\n             src=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${media.getApplicationThumbnailUrl(MEDIUM_RESOLUTION)}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      out.write("\" border=\"0\" alt=\"\"/>\n      </div>\n    </center>\n    ");
      if (_jspx_meth_gallery_005fdisplayMediaMetadata_005f0(_jspx_parent, _jspx_page_context))
        return true;
      return false;
    }
    public void invoke( java.io.Writer writer )
      throws javax.servlet.jsp.JspException
    {
      javax.servlet.jsp.JspWriter out = null;
      if( writer != null ) {
        out = this.jspContext.pushBody(writer);
      } else {
        out = this.jspContext.getOut();
      }
      try {
        Object _jspx_saved_JspContext = this.jspContext.getELContext().getContext(javax.servlet.jsp.JspContext.class);
        this.jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,this.jspContext);
        switch( this.discriminator ) {
          case 0:
            invoke0( out );
            break;
          case 1:
            invoke1( out );
            break;
        }
        jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,_jspx_saved_JspContext);
      }
      catch( java.lang.Throwable e ) {
        if (e instanceof javax.servlet.jsp.SkipPageException)
            throw (javax.servlet.jsp.SkipPageException) e;
        throw new javax.servlet.jsp.JspException( e );
      }
      finally {
        if( writer != null ) {
          this.jspContext.popBody();
        }
      }
    }
  }
}
