source: trunk/www/lims/arraybatches/list_batches.jsp @ 5674

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

Fixes #1611: Checkbox enabled lists for enumerated annotations

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