source: trunk/www/views/experiments/edit_experiment.jsp @ 5767

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

Fixes #1626: Center-align text on buttons

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 20.4 KB
Line 
1<%-- $Id: edit_experiment.jsp 5767 2011-09-28 07:31:39Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2005 Nicklas Nordborg
4  Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
5
6  This file is part of BASE - BioArray Software Environment.
7  Available at http://base.thep.lu.se/
8
9  BASE is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License
11  as published by the Free Software Foundation; either version 3
12  of the License, or (at your option) any later version.
13
14  BASE is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  GNU General Public License for more details.
18
19  You should have received a copy of the GNU General Public License
20  along with BASE. If not, see <http://www.gnu.org/licenses/>.
21  ------------------------------------------------------------------
22
23
24  @author Nicklas
25  @version 2.0
26--%>
27<%@ page pageEncoding="UTF-8" session="false"
28  import="net.sf.basedb.core.SessionControl"
29  import="net.sf.basedb.core.DbControl"
30  import="net.sf.basedb.core.Item"
31  import="net.sf.basedb.core.ItemContext"
32  import="net.sf.basedb.core.Permission"
33  import="net.sf.basedb.core.Experiment"
34  import="net.sf.basedb.core.RawBioAssay"
35  import="net.sf.basedb.core.AnnotationType"
36  import="net.sf.basedb.core.RawDataType"
37  import="net.sf.basedb.core.RawDataTypes"
38  import="net.sf.basedb.core.Directory"
39  import="net.sf.basedb.core.ItemQuery"
40  import="net.sf.basedb.core.ItemResultList"
41  import="net.sf.basedb.core.Include"
42  import="net.sf.basedb.core.Type"
43  import="net.sf.basedb.core.query.Restrictions"
44  import="net.sf.basedb.core.query.Expressions"
45  import="net.sf.basedb.core.query.Orders"
46  import="net.sf.basedb.core.query.Hql"
47  import="net.sf.basedb.core.PermissionDeniedException"
48  import="net.sf.basedb.core.BaseException"
49  import="net.sf.basedb.core.Project"
50  import="net.sf.basedb.clients.web.Base"
51  import="net.sf.basedb.clients.web.WebException"
52  import="net.sf.basedb.clients.web.util.HTML"
53  import="net.sf.basedb.util.Values"
54  import="net.sf.basedb.util.Enumeration"
55  import="net.sf.basedb.util.formatter.Formatter"
56  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
57  import="net.sf.basedb.clients.web.formatter.FormatterSettings"
58  import="net.sf.basedb.core.plugin.GuiContext"
59  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
60  import="net.sf.basedb.clients.web.extensions.JspContext"
61  import="net.sf.basedb.clients.web.extensions.edit.EditUtil"
62  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
63  import="java.util.Arrays"
64  import="java.util.Date"
65  import="java.util.List"
66%>
67<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
68<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
69<%
70final Item itemType = Item.EXPERIMENT;
71final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
72final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
73final int itemId = cc.getId();
74final String ID = sc.getId();
75final float scale = Base.getScale(sc);
76final DbControl dc = sc.newDbControl();
77try
78{
79  String title = null;
80  Experiment experiment = null;
81  RawDataType currentRawDataType = null;
82  RawDataType defaultRawDataType = null;
83  ItemQuery<RawBioAssay> rbaQuery = null;
84  ItemQuery<AnnotationType> efQuery = null;
85 
86  boolean readCurrentDirectory = true;
87  Directory currentDirectory = null;
88
89  List<Directory> recentDirectories = (List<Directory>)cc.getRecent(dc, Item.DIRECTORY);
90
91  int activeProjectId = sc.getActiveProjectId();
92  if (activeProjectId > 0)
93  {
94    Project activeProject = Project.getById(dc, activeProjectId);   
95    defaultRawDataType = activeProject.getDefaultRawDataType();
96  } 
97  if (itemId == 0)
98  {
99    title = "Create experiment";
100    currentRawDataType = RawDataTypes.getRawDataType(cc.getPropertyValue("rawDataType"));
101    if (currentRawDataType == null)
102    {
103      currentRawDataType = RawDataTypes.getRawDataType(cc.getRecent("RawDataType", 0));
104    }
105    if (cc.getPropertyFilter("directory.name") != null)
106    {
107      currentDirectory = Base.getFirstMatching(dc, Directory.getQuery(), "name", cc.getPropertyFilter("directory.name"));
108    }
109    cc.removeObject("item");
110    String[] selected = request.getParameterValues("rawbioassay_id");
111    if (selected != null)
112    {
113      rbaQuery = RawBioAssay.getQuery();
114      rbaQuery.restrict(Restrictions.in(Hql.property("id"), Expressions.parameter("selected")));
115      rbaQuery.setParameter("selected", Arrays.asList(Values.getInt(selected)), Type.INT);
116    }   
117  }
118  else
119  {
120    experiment = Experiment.getById(dc, itemId);
121    rbaQuery = experiment.getRawBioAssays();
122    efQuery = experiment.getExperimentalFactors();
123    cc.setObject("item", experiment);
124    try
125    {
126      currentRawDataType = experiment.getRawDataType();
127    }
128    catch (Throwable t)
129    {}
130    title = "Edit experiment -- " + HTML.encodeTags(experiment.getName());
131    try
132    {
133      currentDirectory = experiment.getDirectory();
134    }
135    catch (PermissionDeniedException ex)
136    {
137      readCurrentDirectory = false;
138    }
139  }
140  if (experiment != null) experiment.checkPermission(Permission.WRITE);
141 
142  final String clazz = "class=\"text\"";
143  final String requiredClazz = "class=\"text required\"";
144  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
145  String dateFormat = FormatterSettings.getDateFormat(sc);
146  String jsDateFormat = HTML.javaScriptEncode(dateFormat);
147  String htmlDateFormat = HTML.encodeTags(dateFormat);
148  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), experiment);
149  ExtensionsInvoker invoker = EditUtil.useEditExtensions(jspContext);
150  %>
151  <base:page type="popup" title="<%=title%>">
152  <base:head scripts="tabcontrol.js,linkitems.js" styles="tabcontrol.css">
153    <ext:scripts context="<%=jspContext%>" />
154    <ext:stylesheets context="<%=jspContext%>" />
155    <script language="JavaScript">
156    // Validate the "Experiment" tab
157    function validateExperiment()
158    {
159      var frm = document.forms['experiment'];
160      if (Main.trimString(frm.name.value) == '')
161      {
162        alert("You must enter a name");
163        frm.name.focus();
164        return false;
165      }
166      if (frm.rawdatatype)
167      {
168        if (frm.rawdatatype[frm.rawdatatype.selectedIndex].value == '')
169        {
170          alert("You must select a raw data type");
171          frm.rawdatatype.focus();
172          return false;
173        }
174      }
175      return true;
176    }
177   
178    // Validate the "Experimental factors" tab
179    function validateExperimentalFactors()
180    {
181      return true;
182    }
183
184    // Submit the form
185    function saveSettings()
186    {
187      var frm = document.forms['experiment'];
188      if (TabControl.validateActiveTab('settings'))
189      {
190        frm.addedRawBioAssays.value = Link.getActionIds(1, 'R').join(',');
191        frm.removedRawBioAssays.value = Link.getActionIds(-1, 'R').join(',');
192
193        frm.addedAnnotationTypes.value = Link.getActionIds(1, 'A').join(',');
194        frm.removedAnnotationTypes.value = Link.getActionIds(-1, 'A').join(',');
195       
196        frm.submit();
197      }
198    }
199   
200    function addRawBioAssaysOnClick()
201    {
202      var frm = document.forms['experiment'];
203      var ids = Link.getListIds(frm.rawBioAssays, 'R');
204      var excludes = ids.join(',');
205      var rawDataType = <%=currentRawDataType == null ? "frm.rawdatatype[frm.rawdatatype.selectedIndex].value" : "'"+currentRawDataType.getId()+"'"%>;
206      var url = '../rawbioassays/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectmultiple&callback=addRawBioAssayCallback';
207      url += "&exclude="+excludes;
208      url += '&resetTemporary=1&tmpfilter:STRING:rawDataType='+rawDataType;
209      Main.openPopup(url, 'AddRawBioAssays', 1000, 700);
210    }
211    function addRawBioAssayCallback(rawBioAssayId, name)
212    {
213      var item = Link.getItem('R', rawBioAssayId);
214      if (!item) item = new Item('R', rawBioAssayId, name);
215      Link.addItem(document.forms['experiment'].rawBioAssays, item);
216    }
217    function removeRawBioAssaysOnClick()
218    {
219      Link.removeSelected(document.forms['experiment'].rawBioAssays);
220    }
221   
222    function addAnnotationTypesOnClick()
223    {
224      var frm = document.forms['experiment'];
225      var ids = Link.getListIds(frm.annotationTypes, 'A');
226      var excludes = ids.join(',');
227      var url = '../../admin/annotationtypes/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectmultiple&callback=addAnnotationTypeCallback';
228      url += "&exclude="+excludes;
229      Main.openPopup(url, 'AddAnnotationTypes', 1000, 700);
230    }
231    function addAnnotationTypeCallback(annotationTypeId, name)
232    {
233      var item = Link.getItem('A', annotationTypeId);
234      if (!item) item = new Item('A', annotationTypeId, name);
235      Link.addItem(document.forms['experiment'].annotationTypes, item);
236    }
237    function removeAnnotationTypesOnClick()
238    {
239      Link.removeSelected(document.forms['experiment'].annotationTypes);
240    }
241    function selectDirectoryOnClick()
242    {
243      var frm = document.forms['experiment'];
244      var url = '../../filemanager/directories/index.jsp?ID=<%=ID%>&mode=selectonedirectory&callback=setDirectoryCallback';
245      if (frm.directory_id.length > 1)
246      {
247        var id = Math.abs(parseInt(frm.directory_id[1].value));       
248        url += '&directory_id='+id;
249      }
250      Main.openPopup(url, 'SelectDirectory', 350, 500);
251    }
252    function setDirectoryCallback(id, name)
253    {
254      var frm = document.forms['experiment'];
255      var list = frm.directory_id;
256      if (list.length < 2 || list[1].value == '0') // >
257      {
258        Forms.addListOption(list, 1, new Option());
259      }
260      list[1].value = id;
261      list[1].text = name;
262      list.selectedIndex = 1;
263    }
264
265    function init()
266    {
267      var frm = document.forms['experiment'];
268      <%
269      if (experiment == null)
270      {
271        %>
272        frm.name.focus();
273        frm.name.select();
274        <%
275      }
276      if (rbaQuery != null)
277      {
278        %>
279        var rawBioAssays = frm.rawBioAssays;
280        <%
281        rbaQuery.include(Include.ALL);
282        rbaQuery.order(Orders.asc(Hql.property("name")));
283        ItemResultList<RawBioAssay> rawBioAssays = rbaQuery.list(dc);
284        if (rawBioAssays.size() > 0 && experiment == null) currentRawDataType = null;
285        for (RawBioAssay rba : rawBioAssays)
286        {
287          RawDataType rbaDataType = null;
288          try
289          {
290            rbaDataType = rba.getRawDataType();
291          }
292          catch (Throwable t)
293          {}
294          if (currentRawDataType == null) 
295          {
296            currentRawDataType = rbaDataType;
297          }
298          String linkMethod = "addNewItem";
299          if (experiment == null)
300          {
301            linkMethod = "addItem";
302            // Checks for new experiment
303            if (rbaDataType != currentRawDataType)
304            {
305              throw new WebException("popup", "Raw data types doesn't match",
306                "The raw data type of the selected raw bioassays are not the same. " + 
307                "It is not possible to mix raw data types in an experiment.");
308            }
309          }
310          %>
311          Link.<%=linkMethod%>(rawBioAssays, new Item('R', <%=rba.getId()%>, '<%=HTML.javaScriptEncode(rba.getName())%>'));
312          <%
313        }
314      }
315      if (efQuery != null)
316      {
317        %>
318        var annotationTypes = frm.annotationTypes;
319        <%
320        efQuery.include(Include.ALL);
321        efQuery.order(Orders.asc(Hql.property("name")));
322        ItemResultList<AnnotationType> experimentalFactors = efQuery.list(dc);
323        for (AnnotationType at : experimentalFactors)
324        {
325          %>
326          Link.addNewItem(annotationTypes, new Item('A', <%=at.getId()%>, '<%=HTML.javaScriptEncode(at.getName())%>'));
327          <%
328        }
329      }
330      %>
331    }
332    </script>
333  </base:head>
334  <base:body onload="init()">
335    <p>
336    <form action="index.jsp?ID=<%=ID%>" method="post" name="experiment" onsubmit="return false;">
337    <input type="hidden" name="cmd" value="UpdateItem">
338
339    <h3 class="docked"><%=title%> <base:help tabcontrol="settings" /></h3>
340    <t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*370)+"px;"%>" 
341      position="bottom" remember="<%=experiment != null%>"
342      extensions="<%=invoker%>">
343    <t:tab id="info" title="Experiment" validate="validateExperiment()" helpid="experiment.edit">
344      <table class="form" cellspacing=0>
345      <tr>
346        <td class="prompt">Name</td>
347        <td><input <%=requiredClazz%> type="text" name="name" 
348          value="<%=HTML.encodeTags(experiment == null ? Values.getString(cc.getPropertyValue("name"), "New experiment") : experiment.getName())%>" 
349          size="40" maxlength="<%=Experiment.MAX_NAME_LENGTH%>"></td>
350      </tr>
351     
352      <tr>
353        <td class="prompt">Raw data type</td>
354        <td>
355          <%
356          if (experiment == null)
357          {
358            currentRawDataType = currentRawDataType != null ? 
359              currentRawDataType : defaultRawDataType;
360            Enumeration<RawDataType, String> rawEnumeration = 
361              new Enumeration<RawDataType, String>();
362            for (RawDataType rdt : RawDataTypes.getRawDataTypes())
363            {
364              rawEnumeration.add(rdt, rdt.getName());
365            }
366            rawEnumeration.sortValues();           
367            %>
368            <select name="rawdatatype" class="required unchangeable">
369            <%
370            for (int i = 0; i < rawEnumeration.size(); ++i)
371            {
372              RawDataType rdt = rawEnumeration.getKey(i);
373              String selected = rdt.equals(currentRawDataType) ? "selected" : "";
374              %>
375              <option value="<%=rdt.getId()%>" <%=selected%>><%=HTML.encodeTags(rdt.getName())%>
376              <%
377            }
378            %>
379            </select>
380            <%
381          }
382          else
383          {
384            %>
385            <base:catch><%=HTML.encodeTags(experiment.getRawDataType().getName())%></base:catch>
386            <%
387          }
388          %>
389       
390        </td>
391      </tr>
392      <tr>
393        <td class="prompt">Directory</td>
394        <td>
395          <base:select 
396            id="directory_id"
397            clazz="selectionlist"
398            required="false"
399            current="<%=currentDirectory%>"
400            denied="<%=!readCurrentDirectory%>"
401            recent="<%=recentDirectories%>"
402            newitem="<%=experiment == null%>"
403            onselect="selectDirectoryOnClick()"
404          />
405        </td>
406      </tr>
407      <tr valign="top">
408        <td class="prompt">Raw bioassays</td>
409        <td>
410          <table border="0" cellspacing="0" cellpadding="0">
411          <tr valign="top">
412          <td>
413            <select name="rawBioAssays" size="5" multiple style="width: 20em;">
414            </select>
415            <input type="hidden" name="addedRawBioAssays" value="">
416            <input type="hidden" name="removedRawBioAssays" value="">
417          </td>
418          <td>
419            <table border="0">
420            <tr><td width="150"><base:button 
421              clazz="leftaligned buttonclass"
422              onclick="addRawBioAssaysOnClick()" 
423              title="Add&nbsp;raw bioassays&hellip;" 
424              tooltip="Add raw bioassays"
425              /></td></tr>
426            <tr><td width="150"><base:button 
427              clazz="leftaligned buttonclass"
428              onclick="removeRawBioAssaysOnClick()" 
429              title="Remove" 
430              tooltip="Remove the selected raw bioassays"
431            /></td></tr>
432            </table>
433          </td>
434          </tr>
435          </table>
436        </td>
437      </tr>
438      <tr valign=top>
439        <td class="prompt">Description</td>
440        <td nowrap>
441          <textarea <%=clazz%> rows="4" cols="40" name="description" wrap="virtual"
442            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("description") : experiment.getDescription())%></textarea>
443          <a href="javascript:Main.zoom('Description', 'rawbioassay', 'description')"
444            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
445        </td>
446      </tr>
447      </table>
448      <div align=right>
449        &nbsp;<i><base:icon image="required.gif" /> = required information</i>
450        <%if (experiment == null) {%><br>
451        <i><base:icon image="unchangeable.gif" /> = can't be changed later</i>
452        <%}%>
453        </div>
454    </t:tab>
455   
456    <t:tab id="publication" title="Publication"  helpid="experiment.edit.publication">
457      <table class="form" cellspacing=0>
458      <tr>
459        <td class="prompt">PubMedId</td>
460        <td><input <%=clazz%> type="text" name="pubMedId" 
461          value="<%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("pubMedId") : experiment.getPubMedId())%>" 
462          size="40" maxlength="<%=Experiment.MAX_PUBMEDID_LENGTH%>"></td>
463      </tr>
464        <td class="prompt">Title</td>
465        <td nowrap>
466          <textarea <%=clazz%> rows="4" cols="40" name="title" wrap="virtual"
467            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("title") : experiment.getTitle())%></textarea>
468          <a href="javascript:Main.zoom('Title', 'experiment', 'title')"
469            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
470        </td>
471      </tr>
472      <tr>
473        <td class="prompt">Publication date</td>
474        <td>
475          <table border="0" cellspacing="0" cellpadding="0">
476          <tr>
477          <td>
478            <input <%=clazz%> type="text" name="publicationDate" 
479              value="<%=HTML.encodeTags(dateFormatter.format(experiment == null ? 
480                (Date)cc.getPropertyObject("publicationDate") : experiment.getPublicationDate()))%>" 
481              size="20" maxlength="20" title="Enter date in format: <%=htmlDateFormat%>">
482            &nbsp;
483          </td>
484          <td>
485          <base:button 
486            onclick="<%="Dates.selectDate('Publication date', 'experiment', 'publicationDate', null, '"+jsDateFormat+"')"%>"
487            image="calendar.png"
488            title="Calendar&hellip;" 
489            tooltip="Select a date from a calendar" 
490          />
491          </td>
492          </tr>
493          </table>
494        </td>
495      </tr>
496      <tr valign=top>
497        <td class="prompt">Abstract</td>
498        <td nowrap>
499          <textarea <%=clazz%> rows="4" cols="40" name="abstract" wrap="virtual"
500            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("abstract") : experiment.getAbstract())%></textarea>
501          <a href="javascript:Main.zoom('Abstract', 'experiment', 'abstract')"
502            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
503        </td>
504      </tr>
505      <tr valign=top>
506        <td class="prompt">Experiment design</td>
507        <td nowrap>
508          <textarea <%=clazz%> rows="4" cols="40" name="experimentDesign" wrap="virtual"
509            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("experimentDesign") : experiment.getExperimentDesign())%></textarea>
510          <a href="javascript:Main.zoom('Experiment design', 'experiment', 'experimentDesign')"
511            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
512        </td>
513      </tr>
514      <tr valign=top>
515        <td class="prompt">Experiment type</td>
516        <td nowrap>
517          <textarea <%=clazz%> rows="4" cols="40" name="experimentType" wrap="virtual"
518            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("experimentType") : experiment.getExperimentType())%></textarea>
519          <a href="javascript:Main.zoom('Experiment type', 'experiment', 'experimentType')"
520            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
521        </td>
522      </tr>
523      <tr valign=top>
524        <td class="prompt">Affiliations</td>
525        <td nowrap>
526          <textarea <%=clazz%> rows="4" cols="40" name="affiliations" wrap="virtual"
527            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("affiliations") : experiment.getAffiliations())%></textarea>
528          <a href="javascript:Main.zoom('Affiliations', 'experiment', 'affiliations')"
529            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
530        </td>
531      </tr>
532      <tr valign=top>
533        <td class="prompt">Authors</td>
534        <td nowrap>
535          <textarea <%=clazz%> rows="4" cols="40" name="authors" wrap="virtual"
536            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("authors") : experiment.getAuthors())%></textarea>
537          <a href="javascript:Main.zoom('Authors', 'experiment', 'authors')"
538            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
539        </td>
540      </tr>
541      <tr valign=top>
542        <td class="prompt">Publication</td>
543        <td nowrap>
544          <textarea <%=clazz%> rows="4" cols="40" name="publication" wrap="virtual"
545            ><%=HTML.encodeTags(experiment == null ? cc.getPropertyValue("publication") : experiment.getPublication())%></textarea>
546          <a href="javascript:Main.zoom('Publication', 'experiment', 'publication')"
547            title="Edit in larger window"><base:icon image="zoom.gif" /></a>
548        </td>
549      </tr>
550      </table>
551      </t:tab>
552     
553      <t:tab id="experimentalFactors" title="Experimental factors" 
554        validate="validateExperimentalFactors()" helpid="experiment.edit.factors">
555      <table class="form" cellspacing=0 width="100%">
556
557      <tr valign="top">
558        <td class="prompt">Annotation types</td>
559      </tr>
560      <tr>
561        <td>
562          <select name="annotationTypes" size="20" multiple style="width: 100%;">
563          </select>
564          <input type="hidden" name="addedAnnotationTypes" value="">
565          <input type="hidden" name="removedAnnotationTypes" value="">
566        </td>
567        <td width="200px">
568          <table border="0">
569          <tr><td width="150"><base:button 
570            clazz="leftaligned buttonclass"
571            onclick="addAnnotationTypesOnClick()" 
572            title="Add annotation types&hellip;" 
573            tooltip="Add annotation types"
574            /></td></tr>
575          <tr><td width="150"><base:button 
576            clazz="leftaligned buttonclass"
577            onclick="removeAnnotationTypesOnClick()" 
578            title="Remove" 
579            tooltip="Remove the selected annotation types"
580          /></td></tr>
581          </table>
582        </td>
583      </tr>
584      </table>
585      </t:tab>
586
587    </t:tabcontrol>
588
589    <table align="center">
590    <tr>
591      <td width="50%"><base:button onclick="saveSettings()" title="Save" /></td>
592      <td width="50%"><base:button onclick="window.close()" title="Cancel" /></td>
593    </tr>
594    </table>
595    </form>
596  </base:body>
597  </base:page>
598  <%
599}
600finally
601{
602  if (dc != null) dc.close();
603}
604%>
Note: See TracBrowser for help on using the repository browser.