source: trunk/www/exception/duplicate_wizard.jsp @ 5395

Last change on this file since 5395 was 5395, checked in by Nicklas Nordborg, 12 years ago

Fixes #738: Implement file upload as a pure servlet

It is not the file upload itself that is the real problem, it is the fact that the upload is sent to a hidden frame and that it is difficult to handle errors (eg. show them to the user). The new solution is to simply let the error be generated in the hidden frame and then use a javascript callback in the parent window to re-size the frames so that the upload-frame becomes visible instead.

I have also got rid of the non-ajax version of progress reporter since this could also cause problems. The progress reporting is no longer responsible for any error handling (since it is possible for an error to happen before the progress reporting infrastructure has been setup).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 2.4 KB
Line 
1<%-- $Id: duplicate_wizard.jsp 5395 2010-08-27 12:55:56Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2007 Nicklas Nordborg
4
5  This file is part of BASE - BioArray Software Environment.
6  Available at http://base.thep.lu.se/
7
8  BASE is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License
10  as published by the Free Software Foundation; either version 3
11  of the License, or (at your option) any later version.
12
13  BASE is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  GNU General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with BASE. If not, see <http://www.gnu.org/licenses/>.
20  ------------------------------------------------------------------
21
22  This page is used to catch DuplicateWizardException which are
23  directed here via the exception.jsp page. This exception can be
24  thrown when a user tries to open more than one plug-in/job configuration
25  wizard at the same time.
26
27  @author Nicklas
28  @version 2.4
29--%>
30<%@ page session="false"
31  isErrorPage="true"
32%>
33<%@ taglib prefix="base" uri="/WEB-INF/base.tld"
34%>
35<%
36Throwable t = exception;
37//t is either a JasperException, a ServletException or a WebException; see exception.jsp
38if (t instanceof org.apache.jasper.JasperException)
39{
40  t = ((org.apache.jasper.JasperException)t).getRootCause();
41}
42if (t instanceof ServletException)
43{
44  t = ((ServletException)t).getRootCause();
45  // t should now be an DuplicateWizardException
46}
47Throwable ex = t;
48%>
49<base:page type="default" menu="exception" title="Another plug-in wizard is active">
50<base:head scripts="exception.js">
51  <script language="JavaScript">
52  function goNext()
53  {
54    if (confirm('Are you sure? Unsaved settings in the other wizard will be lost.'))
55    {
56      location.replace(location.href + '&warnIfOpen=0');
57    }
58  }
59  </script>
60</base:head>
61<base:body onload="Exception.fixWindow(false)">
62
63  <div align="center">
64    <base:note type="error" title="<%="On page "+request.getAttribute("javax.servlet.error.request_uri")%>" style="width:90%;">
65    <%=ex.getMessage()%>
66    </base:note>
67  </div>
68
69  <table align="center">
70  <tr>
71    <td id="next" width="50%"><base:button onclick="goNext();" title="Continue" image="gonext.gif" /></td>
72    <td id="close" width="50%"><base:button onclick="window.top.close();" title="Cancel" /></td>
73  </tr>
74  </table>
75
76</base:body>
77</base:page>
78
Note: See TracBrowser for help on using the repository browser.