source: trunk/www/biomaterials/extracts/list_extracts.jsp @ 3190

Last change on this file since 3190 was 3190, checked in by Johan Enell, 16 years ago

Merged log:branches/2.2.2#3116:3186 to trunk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 20.7 KB
Line 
1<%-- $Id: list_extracts.jsp 3190 2007-03-13 10:05:42Z enell $
2  ------------------------------------------------------------------
3  Copyright (C) Authors contributing to this file.
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 2
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 this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA  02111-1307, USA.
22  ------------------------------------------------------------------
23
24  @author Nicklas
25  @version 2.0
26--%>
27<%@ page 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.Extract"
32  import="net.sf.basedb.core.LabeledExtract"
33  import="net.sf.basedb.core.Sample"
34  import="net.sf.basedb.core.BioMaterialEvent"
35  import="net.sf.basedb.core.AnnotationType"
36  import="net.sf.basedb.core.AnnotationSet"
37  import="net.sf.basedb.core.ItemQuery"
38  import="net.sf.basedb.core.Include"
39  import="net.sf.basedb.core.ItemResultIterator"
40  import="net.sf.basedb.core.ItemResultList"
41  import="net.sf.basedb.core.ItemContext"
42  import="net.sf.basedb.core.Permission"
43  import="net.sf.basedb.core.PluginDefinition"
44  import="net.sf.basedb.core.query.Hql"
45  import="net.sf.basedb.core.query.Restrictions"
46  import="net.sf.basedb.core.query.Expressions"
47  import="net.sf.basedb.core.query.Orders"
48  import="net.sf.basedb.core.plugin.GuiContext"
49  import="net.sf.basedb.core.plugin.Plugin"
50  import="net.sf.basedb.core.Type"
51  import="net.sf.basedb.util.Enumeration"
52  import="net.sf.basedb.clients.web.Base"
53  import="net.sf.basedb.clients.web.ModeInfo"
54  import="net.sf.basedb.clients.web.PermissionUtil"
55  import="net.sf.basedb.clients.web.util.HTML"
56  import="net.sf.basedb.util.formatter.Formatter"
57  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
58  import="net.sf.basedb.util.Values"
59  import="java.util.List"
60  import="java.util.Map"
61  import="java.util.Date"
62%>
63<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
64<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
65<%!
66  private static final Item itemType = Item.EXTRACT;
67  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST);
68%>
69<%
70final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
71final String ID = sc.getId();
72final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType);
73final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
74
75final ModeInfo mode = ModeInfo.get(request.getParameter("mode"));
76final String callback = request.getParameter("callback");
77final String title = mode.generateTitle("extract", "extracts");
78final DbControl dc = sc.newDbControl();
79ItemResultIterator<Extract> extracts = null;
80ItemResultList<AnnotationType> annotationTypes = null;
81try
82{
83  final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
84  final ItemQuery<Extract> query = Base.getConfiguredQuery(cc, true, Extract.getQuery(), mode);
85  final boolean createLabeledExtractPermission = sc.hasPermission(Permission.CREATE, Item.LABELEDEXTRACT);
86  final ItemQuery<LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery();
87  labeledExtractQuery.include(cc.getInclude());
88  labeledExtractQuery.restrict(Restrictions.eq(Hql.property("parent"), Expressions.parameter("extracts")));
89  labeledExtractQuery.order(Orders.asc(Hql.property("name"))); 
90
91  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
92  annotationTypes = annotationTypeQuery.list(dc);
93  try
94  {
95    extracts = query.iterate(dc);
96  }
97  catch (Throwable t)
98  {
99    cc.setMessage(t.getMessage());
100  }
101  int numListed = 0;
102  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
103  %>
104  <base:page title="<%=title==null ? "Extracts" : title%>" type="<%=mode.getPageType()%>">
105  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
106    <script language="JavaScript">
107    var submitPage = 'index.jsp';
108    var formId = 'extracts';
109    function newItem()
110    {
111      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', 0, true);
112    }
113    function newPooledItem()
114    {
115      Table.poolItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'NewPooledItem');
116    }
117    function editItem(itemId)
118    {
119      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', itemId, true);
120    }
121    function viewItem(itemId)
122    {
123      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', itemId, false);
124    }
125    function itemOnClick(evt, itemId)
126    {
127      Table.itemOnClick(formId, evt, itemId, '<%=mode.getName()%>', viewItem, editItem, returnSelected);
128    }
129    function newLabeledExtract(extractId)
130    {
131      Main.viewOrEditItem('<%=ID%>', 'LABELEDEXTRACT', 0, true, '&extract_id='+extractId);
132    }
133    function deleteItems()
134    {
135      var frm = document.forms[formId];
136      if (Forms.numChecked(frm) == 0)
137      {
138        alert('Please select at least one item in the list');
139        return;
140      }
141      frm.action = submitPage;
142      frm.cmd.value = 'DeleteItems';
143      frm.submit();
144    }
145    function restoreItems()
146    {
147      var frm = document.forms[formId];
148      if (Forms.numChecked(frm) == 0)
149      {
150        alert('Please select at least one item in the list');
151        return;
152      }
153      frm.action = submitPage;
154      frm.cmd.value = 'RestoreItems';
155      frm.submit();
156    }
157    function takeOwnership()
158    {
159      var frm = document.forms[formId];
160      if (Forms.numChecked(frm) == 0)
161      {
162        alert('Please select at least one item in the list');
163        return;
164      }
165      if (confirm('Are you sure that you want to take ownership of the selected items? It can\'t be undone.'))
166      {
167        frm.action = submitPage;
168        frm.cmd.value = 'TakeOwnershipOfItems';
169        frm.submit();
170      }
171    }
172    function shareItem(itemId)
173    {
174      Main.openPopup('index.jsp?ID=<%=ID%>&cmd=ShareItem&item_id='+itemId, 'ShareExtracts', 500, 400);
175    }
176    function shareItems()
177    {
178      Table.shareItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'ShareItems');
179    }
180    function configureColumns()
181    {
182      Table.configureColumns('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>');
183    }
184    function runPlugin(cmd)
185    {
186      Table.submitToPopup(formId, cmd, 740, 540);
187    }
188    function returnSelected()
189    {
190      Table.returnSelected(formId, <%=callback != null ? "window.opener."+callback : "null" %>);
191      window.close();
192    }
193    function presetOnChange()
194    {
195      Table.presetOnChange('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>');
196    }
197    </script>
198  </base:head>
199 
200  <base:body>
201    <%
202    if (cc.getMessage() != null)
203    {
204      %>
205      <div class="error"><%=cc.getMessage()%></div>
206      <%
207      cc.setMessage(null);
208    }
209    %>
210    <tbl:table 
211      id="extracts" 
212      clazz="itemlist" 
213      columns="<%=cc.getSetting("columns")%>"
214      sortby="<%=cc.getSortProperty()%>" 
215      direction="<%=cc.getSortDirection()%>"
216      title="<%=title%>"
217      action="index.jsp"
218      sc="<%=sc%>"
219      item="<%=itemType%>"
220      >
221      <tbl:hidden 
222        name="mode" 
223        value="<%=mode.getName()%>" 
224      />
225      <tbl:hidden 
226        name="callback" 
227        value="<%=callback%>" 
228        skip="<%=callback == null%>" 
229      />
230      <tbl:columndef 
231        id="name"
232        property="name"
233        datatype="string"
234        title="Name"
235        sortable="true" 
236        filterable="true"
237        exportable="true"
238        show="always" 
239      />
240      <tbl:columndef 
241        id="externalId"
242        property="externalId"
243        datatype="string"
244        title="External id"
245        sortable="true" 
246        filterable="true"
247        exportable="true"
248      />
249      <tbl:columndef 
250        id="originalQuantity"
251        property="originalQuantity"
252        datatype="float"
253        title="Original quantity (µg)"
254        sortable="true" 
255        filterable="true"
256        exportable="true"
257      />
258      <tbl:columndef 
259        id="remainingQuantity"
260        property="remainingQuantity"
261        datatype="float"
262        title="Remaining quantity (µg)"
263        sortable="true" 
264        filterable="true"
265        exportable="true"
266      />
267      <tbl:columndef 
268        id="protocol"
269        property="creationEvent.protocol"
270        sortproperty="creationEvent.protocol.name"
271        filterproperty="creationEvent.protocol.name"
272        exportproperty="creationEvent.protocol.name"
273        datatype="string"
274        title="Protocol"
275        sortable="true" 
276        filterable="true"
277        exportable="true"
278      />
279      <tbl:columndef 
280        id="eventDate"
281        property="creationEvent.eventDate"
282        datatype="date"
283        title="Created"
284        sortable="true" 
285        filterable="true"
286        exportable="true"
287        formatter="<%=dateFormatter%>"
288      />
289      <tbl:columndef 
290        id="entryDate"
291        property="creationEvent.entryDate"
292        datatype="date"
293        title="Registered"
294        sortable="true" 
295        filterable="true"
296        exportable="true"
297        formatter="<%=dateFormatter%>"
298      />
299      <tbl:columndef 
300        id="pooled"
301        property="pooled"
302        datatype="boolean"
303        title="Pooled"
304        sortable="true" 
305        filterable="true"
306        exportable="true"
307      />
308      <tbl:columndef
309        id="parents"
310        title="Parents"
311      />
312      <tbl:columndef
313        id="labeledextracts"
314        title="Labeled extracts"
315      />
316      <tbl:columndef 
317        id="owner"
318        property="owner.name"
319        datatype="string"
320        title="Owner"
321        sortable="true" 
322        filterable="true"
323        exportable="true"
324      />
325      <tbl:columndef 
326        id="description"
327        property="description"
328        datatype="string"
329        title="Description" 
330        sortable="true" 
331        filterable="true" 
332        exportable="true"
333      />     
334      <%
335      for (AnnotationType at : annotationTypes)
336      {
337        Enumeration<String, String> annotationEnum = null;
338        Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
339        if (at.isEnumeration())
340        {
341          annotationEnum = new Enumeration<String, String>();
342          List<?> values = at.getValues();
343          for (Object value : values)
344          {
345            String encoded = formatter.format(value);
346            annotationEnum.add(encoded, encoded);
347          }
348        }
349        %>
350        <tbl:columndef 
351          id="<%="at"+at.getId()%>"
352          title="<%=HTML.encodeTags(at.getName())+" [A]"%>" 
353          property="<%="#"+at.getId()%>"
354          annotation="true"
355          datatype="<%=at.getValueType().getStringValue()%>"
356          enumeration="<%=annotationEnum%>"
357          sortable="false" 
358          filterable="true" 
359          exportable="true"
360          formatter="<%=formatter%>"
361        />
362        <%
363      }
364      %>
365      <tbl:columndef
366        id="permission"
367        title="Permission"
368      />
369      <tbl:toolbar
370        visible="<%=mode.hasToolbar()%>"
371        >
372        <tbl:button 
373          disabled="<%=createPermission ? false : true%>" 
374          image="<%=createPermission ? "new.gif" : "new_disabled.gif"%>" 
375          onclick="newItem()" 
376          title="New&hellip;" 
377          tooltip="<%=createPermission ? "Create new extract" : "You do not have permission to create extracts"%>" 
378        />
379        <tbl:button 
380          disabled="<%=createPermission ? false : true%>" 
381          image="<%=createPermission ? "new_pooled.gif" : "new_pooled_disabled.gif"%>" 
382          onclick="newPooledItem()" 
383          title="Pool&hellip;" 
384          tooltip="<%=createPermission ? "Create new pooled extract" : "You do not have permission to create extracts"%>" 
385        />
386        <tbl:button 
387          image="delete.gif"
388          onclick="deleteItems()" 
389          title="Delete" 
390          tooltip="Delete the selected items" 
391        />
392        <tbl:button 
393          image="restore.gif"
394          onclick="restoreItems()" 
395          title="Restore" 
396          tooltip="Restore the selected (deleted) items"
397        />
398        <tbl:button 
399          image="share.gif"
400          onclick="shareItems()" 
401          title="Share&hellip;" 
402          tooltip="Share the selected items"
403        />
404        <tbl:button 
405          image="take_ownership.png"
406          onclick="takeOwnership()" 
407          title="Take ownership&hellip;"
408          tooltip="Take ownership of the selected items"
409        />
410        <tbl:button 
411          image="columns.gif" 
412          onclick="configureColumns()" 
413          title="Columns&hellip;" 
414          tooltip="Show, hide and re-order columns" 
415        />
416        <tbl:button 
417          image="import.gif" 
418          onclick="runPlugin('ImportItems')" 
419          title="Import&hellip;" 
420          tooltip="Import data" 
421          visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
422        />
423        <tbl:button 
424          image="export.gif" 
425          onclick="runPlugin('ExportItems')" 
426          title="Export&hellip;" 
427          tooltip="Export data" 
428          visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
429        />
430        <tbl:button 
431          image="runplugin.gif" 
432          onclick="runPlugin('RunListPlugin')" 
433          title="Run plugin&hellip;" 
434          tooltip="Run a plugin" 
435          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
436        />
437      </tbl:toolbar>
438      <tbl:navigator
439        page="<%=cc.getPage()%>" 
440        rowsperpage="<%=cc.getRowsPerPage()%>" 
441        totalrows="<%=extracts == null ? 0 : extracts.getTotalCount()%>" 
442        visible="<%=mode.hasNavigator()%>"
443      />
444      <tbl:data>
445        <tbl:columns>
446        <tbl:presetselector 
447          clazz="columnheader"
448          colspan="3"
449          onchange="presetOnChange()"
450        />
451        </tbl:columns>
452
453        <tr>
454          <tbl:header 
455            clazz="index"
456            >&nbsp;</tbl:header>
457          <tbl:header 
458            clazz="check" 
459            visible="<%=mode.hasCheck()%>"
460            ><base:icon 
461              image="check_uncheck.gif" 
462              tooltip="Check/uncheck all" 
463              onclick="Forms.checkUncheck(document.forms[formId])" style="align: left;"
464            /></tbl:header>
465          <tbl:header 
466            clazz="check" 
467            visible="<%=mode.hasRadio()%>"
468            >&nbsp;</tbl:header>
469          <tbl:header 
470            clazz="icons" 
471            visible="<%=mode.hasIcons()%>"
472            >&nbsp;</tbl:header>
473          <tbl:propertyfilter />
474        </tr>
475         
476          <tbl:rows>
477          <%
478          int index = cc.getPage()*cc.getRowsPerPage();
479          int selectedItemId = cc.getId();
480          if (extracts != null)
481          {           
482            while (extracts.hasNext())
483            {
484              Extract item = extracts.next();
485              BioMaterialEvent creationEvent = item.getCreationEvent();
486              int itemId = item.getId();
487              boolean usePermission = item.hasPermission(Permission.USE);
488              String openSharePopup = "shareItem("+itemId+")";
489              boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION);
490              boolean writePermission = item.hasPermission(Permission.WRITE);
491              String tooltip = mode.isSelectionMode() ? 
492                  "Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : "");
493              String name = HTML.encodeTags(item.getName());
494              index++;
495              numListed++;
496              %>
497              <tbl:row>
498                <tbl:header 
499                  clazz="index"
500                  ><%=index%></tbl:header>
501                <tbl:header 
502                  clazz="check" 
503                  visible="<%=mode.hasCheck()%>"
504                  ><input 
505                    type="checkbox" 
506                    name="<%=itemId%>" 
507                    value="<%=itemId%>" 
508                    title="<%=name%>" 
509                    <%=cc.getSelected().contains(itemId) ? "checked" : ""%> 
510                  ></tbl:header>
511                <tbl:header 
512                  clazz="check" 
513                  visible="<%=mode.hasRadio()%>"
514                  ><input 
515                    type="radio" 
516                    name="item_id" 
517                    value="<%=itemId%>" 
518                    title="<%=name%>" 
519                    <%=selectedItemId == itemId ? "checked" : ""%>
520                  ></tbl:header>
521                <tbl:header 
522                  clazz="icons" 
523                  visible="<%=mode.hasIcons()%>"
524                  ><base:icon 
525                    image="deleted.gif" 
526                    tooltip="This item has been scheduled for deletion" 
527                    visible="<%=item.isRemoved()%>"
528                  /><base:icon 
529                    image="<%=sharePermission ? "shared.gif" : "shared_disabled.gif"%>" 
530                    onclick="<%=sharePermission ? openSharePopup : null%>"
531                    tooltip="This item is shared to other users, groups and/or projects" 
532                    visible="<%=item.isShared()%>"
533                  />&nbsp;</tbl:header>
534                <tbl:cell column="name"><div class="link" 
535                  onclick="itemOnClick(<%=writePermission ? "event" : null%>, <%=itemId%>)" 
536                  title="<%=tooltip%>"><%=name%></div></tbl:cell>
537                <tbl:cell column="externalId"><%=HTML.encodeTags(item.getExternalId())%></tbl:cell>
538                <tbl:cell column="originalQuantity"><%=Values.formatNumber(item.getOriginalQuantity(), 2)%></tbl:cell>
539                <tbl:cell column="remainingQuantity"><%=Values.formatNumber(item.getRemainingQuantity(), 2)%></tbl:cell>
540                <tbl:cell column="pooled"><%=item.isPooled()%></tbl:cell>
541                <tbl:cell column="protocol"
542                  ><base:propertyvalue 
543                    item="<%=creationEvent%>" 
544                    property="protocol"
545                    enableEditLink="<%=mode.hasEditLink()%>" 
546                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
547                  /></tbl:cell>
548                <tbl:cell column="eventDate" value="<%=creationEvent.getEventDate()%>" />
549                <tbl:cell column="entryDate" value="<%=creationEvent.getEntryDate()%>" />
550                <tbl:cell column="parents">
551                  <%
552                  if (!item.isPooled())
553                  {
554                    %>
555                    <base:propertyvalue item="<%=item%>" property="parent"/>
556                    <%
557                  }
558                  else
559                  {
560                    String separator = "";
561                    ItemQuery<Extract> parentQuery  = (ItemQuery<Extract>)item.getCreationEvent().getSources();
562                    parentQuery.include(Include.MINE, Include.OTHERS, Include.IN_PROJECT, Include.SHARED);
563                    parentQuery.order(Orders.asc(Hql.property("name")));
564                   
565                    for (Extract e : parentQuery.list(dc))
566                    {
567                      out.write(separator);
568                      if (mode.hasPropertyLink())
569                      {
570                        out.write(Base.getLinkedName(ID, e, false, mode.hasEditLink()));
571                      }
572                      else
573                      {
574                        out.write(HTML.encodeTags(e.getName()));
575                      }
576                      separator = ", ";
577                    }
578                  }
579                  %>
580                </tbl:cell>
581                <tbl:cell column="labeledextracts">
582                  <%
583                  labeledExtractQuery.setParameter("extracts", itemId, Type.INT);
584                  try
585                  {
586                    String separator = "";
587                    for (LabeledExtract le : labeledExtractQuery.list(dc))
588                    {
589                      out.write(separator);
590                      if (mode.hasPropertyLink())
591                      {
592                        out.write(Base.getLinkedName(ID, le, false, mode.hasEditLink()));
593                      }
594                      else
595                      {
596                        out.write(HTML.encodeTags(le.getName()));
597                      }
598                      %>
599                      (<base:propertyvalue 
600                        item="<%=le%>" property="label" 
601                        enableEditLink="<%=mode.hasEditLink()%>" 
602                        enablePropertyLink="<%=mode.hasPropertyLink()%>"/>)
603                      <%
604                      separator = ", ";
605                    }
606                  }
607                  catch (Throwable t)
608                  {
609                    %>
610                    <div class="error"><%=t.getMessage()%></div>
611                    <%
612                  }
613                  %>
614                  <base:icon
615                    image="add.png"
616                    onclick="<%="newLabeledExtract("+itemId+")"%>"
617                    tooltip="Create a new labeled extract"
618                    visible="<%=mode.hasEditLink() && createLabeledExtractPermission && usePermission%>"
619                  /></tbl:cell>
620                <tbl:cell column="owner"
621                  ><base:propertyvalue 
622                    item="<%=item%>" 
623                    property="owner"
624                    enableEditLink="<%=mode.hasEditLink()%>" 
625                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
626                  /></tbl:cell>
627                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>               
628                <%
629                AnnotationSet as = item.isAnnotated() ? item.getAnnotationSet() : null;
630                if (as != null)
631                {
632                  for (AnnotationType at : annotationTypes)
633                  {
634                    if (as.hasAnnotation(at))
635                    {
636                      %>
637                      <tbl:cell column="<%="at"+at.getId()%>"
638                        ><tbl:cellvalue 
639                        list="<%=as.getAnnotation(at).getValues()%>" 
640                      /></tbl:cell>
641                      <%
642                    }
643                  }
644                }
645                %>
646                <tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell>
647              </tbl:row>
648              <%
649              }
650            }
651          %>         
652          </tbl:rows>
653      </tbl:data>
654      <%
655      if (numListed == 0)
656      {
657        %>
658        <tbl:panel><%=extracts == null || extracts.getTotalCount() == 0 ? "No extracts were found" : "No extracts on this page. Please select another page!" %></tbl:panel>
659        <%
660      }
661      else
662      {
663        %>
664        <tbl:navigator
665          page="<%=cc.getPage()%>" 
666          rowsperpage="<%=cc.getRowsPerPage()%>" 
667          totalrows="<%=extracts == null ? 0 : extracts.getTotalCount()%>" 
668          visible="<%=mode.hasNavigator()%>"
669          locked="true"
670        />
671        <%
672      }
673      %>
674    </tbl:table>
675    <base:buttongroup align="center" clazz="fixedatbottom">
676      <base:button onclick="returnSelected();" title="Ok" visible="<%=mode.hasOkButton()%>" />
677      <base:button onclick="window.close();" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
678      <base:button onclick="window.close();" title="Close" visible="<%=mode.hasCloseButton()%>" />
679    </base:buttongroup>
680    <br><br><br>
681  </base:body>
682  </base:page>
683  <%
684}
685finally
686{
687  if (extracts != null) extracts.close();
688  if (dc != null) dc.close();
689}
690%>
Note: See TracBrowser for help on using the repository browser.