source: trunk/www/lims/plates/wells/list_wells.jsp @ 5049

Last change on this file since 5049 was 5049, checked in by Martin Svensson, 14 years ago

Fixes #1356 Blank page when listing wells for a plate.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 20.5 KB
Line 
1<%-- $Id: list_wells.jsp 5049 2009-08-17 11:17:51Z martin $
2  ------------------------------------------------------------------
3  Copyright (C) 2006 Johan Enell, Jari Häkkinen, Nicklas Nordborg, Martin Svensson
4  Copyright (C) 2007 Johan Enell, Nicklas Nordborg
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 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.ItemContext"
31  import="net.sf.basedb.core.AnnotationType"
32  import="net.sf.basedb.core.AnnotationSet"
33  import="net.sf.basedb.core.Annotation"
34  import="net.sf.basedb.core.Plate"
35  import="net.sf.basedb.core.Well"
36  import="net.sf.basedb.core.ReporterType"
37  import="net.sf.basedb.core.Reporter"
38  import="net.sf.basedb.core.ItemQuery"
39  import="net.sf.basedb.core.ItemResultIterator"
40  import="net.sf.basedb.core.ItemResultList"
41  import="net.sf.basedb.core.Permission"
42  import="net.sf.basedb.core.PluginDefinition"
43  import="net.sf.basedb.core.ExtendedProperty"
44  import="net.sf.basedb.core.ExtendedProperties"
45  import="net.sf.basedb.core.PermissionDeniedException"
46  import="net.sf.basedb.core.query.Restrictions"
47  import="net.sf.basedb.core.query.Expressions"
48  import="net.sf.basedb.core.query.Orders"
49  import="net.sf.basedb.core.query.Hql"
50  import="net.sf.basedb.core.plugin.GuiContext"
51  import="net.sf.basedb.core.plugin.Plugin"
52  import="net.sf.basedb.core.data.ReporterData"
53  import="net.sf.basedb.util.Enumeration"
54  import="net.sf.basedb.clients.web.Base"
55  import="net.sf.basedb.clients.web.ModeInfo"
56  import="net.sf.basedb.clients.web.PermissionUtil"
57  import="net.sf.basedb.clients.web.util.HTML"
58  import="net.sf.basedb.util.Values"
59  import="net.sf.basedb.util.formatter.Formatter"
60  import="net.sf.basedb.util.formatter.WellCoordinateFormatter"
61  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
62  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
63  import="net.sf.basedb.clients.web.extensions.JspContext"
64  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
65  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
66  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
67  import="java.util.ArrayList"
68  import="java.util.List"
69  import="java.util.Map"
70  import="java.util.Date"
71%>
72<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
73<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
74<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
75<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
76<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
77<%!
78  private static final Item itemType = Item.WELL;
79  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST);
80%>
81<%
82final int plateId = Values.getInt(request.getParameter("plate_id"));
83final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
84final String ID = sc.getId();
85final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
86
87final ModeInfo mode = ModeInfo.get(request.getParameter("mode"));
88final String callback = request.getParameter("callback");
89final String title = mode.generateTitle("well", "wells");
90final DbControl dc = sc.newDbControl();
91ItemResultIterator<Well> wells = null;
92ItemResultList<AnnotationType> annotationTypes = null;
93try
94{
95  final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
96  annotationTypes = annotationTypeQuery.list(dc);
97  final Plate plate = Plate.getById(dc, plateId);
98  final boolean createPermission = plate.hasPermission(Permission.WRITE);
99  final boolean deletePermission = createPermission;
100
101  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
102  final ItemQuery<ReporterType> typeQuery = ReporterType.getQuery();
103  typeQuery.order(Orders.asc(Hql.property("name")));
104  typeQuery.setCacheResult(true);
105  List<ExtendedProperty> reporterProperties = ExtendedProperties.getProperties("ReporterData");
106  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
107  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
108 
109  Enumeration<String,String> rows = new Enumeration<String, String>();
110  WellCoordinateFormatter rowFormatter = new WellCoordinateFormatter(true);
111  for (int i=0; i<plate.getPlateType().getPlateGeometry().getRows(); i++)
112  {
113    rows.add(Integer.toString(i), rowFormatter.format(i));
114  }
115 
116  try
117  {
118    final ItemQuery<Well> query = Base.getConfiguredQuery(dc, cc, true, plate.getWells(), mode);
119    query.join(Hql.leftJoin(null, "reporter", "rpt", null, true));
120    if (!"row".equals(cc.getSortProperty())) query.order(Orders.asc(Hql.property("row")));
121    if (!"column".equals(cc.getSortProperty())) query.order(Orders.asc(Hql.property("column")));
122    wells = query.iterate(dc);
123  }
124  catch (Throwable t)
125  {
126    cc.setMessage(t.getMessage());
127    t.printStackTrace();
128  }
129  int numListed = 0;
130  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, plate);
131  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
132  %>
133  <base:page title="<%=title%>" type="<%=mode.getPageType()%>">
134  <base:head scripts="table.js,tabcontrol.js" styles="table.css,headertabcontrol.css,path.css">
135    <ext:scripts context="<%=jspContext%>" />
136    <ext:stylesheets context="<%=jspContext%>" />
137    <script language="JavaScript">
138    var submitPage = 'index.jsp';
139    var formId = 'wells';
140    function editItem(itemId)
141    {
142      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', itemId, true);
143    }
144    function viewItem(itemId)
145    {
146      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', itemId, false);
147    }
148    function itemOnClick(evt, itemId)
149    {
150      Table.itemOnClick(formId, evt, itemId, '<%=mode.getName()%>', viewItem, editItem, returnSelected);
151    }
152    function configureColumns()
153    {
154      Table.configureColumns('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>');
155    }
156    function runPlugin(cmd)
157    {
158      Table.submitToPopup(formId, cmd, 540, 460);
159    }
160    function returnSelected()
161    {
162      Table.returnSelected(formId, <%=callback != null ? "window.opener."+callback : "null" %>);
163      window.close();
164    }
165    function presetOnChange()
166    {
167      Table.presetOnChange('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>');
168    }
169    function switchTab(tabControlId, tabId)
170    {
171      if (tabId == 'properties' || tabId == 'annotations')
172      {
173        location.href = '../index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=plateId%>&tab='+tabId;
174      }
175      else if (tabId == 'events')
176      {
177        location.href = '../events/index.jsp?ID=<%=ID%>&plate_id=<%=plateId%>';
178      }
179      else
180      {
181        TabControl.setActiveTab(tabControlId, tabId);
182      }
183    }
184    function newReporterList()
185    {
186      Table.submitToPopup(formId, 'CreateReporterList', 540, 400);
187    }
188    </script>
189  </base:head>
190 
191  <base:body>
192    <p>
193    <p:path>
194      <p:pathelement title="Plates" href="<%="../index.jsp?ID="+ID%>" />
195      <p:pathelement title="<%=HTML.encodeTags(plate.getName())%>" />
196    </p:path>
197
198    <t:tabcontrol id="main" active="wells" switch="switchTab">
199    <t:tab id="properties" title="Properties" />
200    <t:tab id="annotations" title="Annotations" />
201    <t:tab id="events" title="Events" />
202   
203    <t:tab id="wells" title="Wells">
204   
205    <%
206    if (cc.getMessage() != null)
207    {
208      %>
209      <div class="error"><%=cc.getMessage()%></div>
210      <%
211      cc.setMessage(null);
212    }
213    %>
214    <tbl:table 
215      id="wells" 
216      clazz="itemlist" 
217      columns="<%=cc.getSetting("columns")%>"
218      sortby="<%=cc.getSortProperty()%>" 
219      direction="<%=cc.getSortDirection()%>"
220      title="<%=title%>"
221      action="index.jsp"
222      sc="<%=sc%>"
223      item="<%=itemType%>"
224      >
225      <tbl:hidden 
226        name="mode" 
227        value="<%=mode.getName()%>" 
228      />
229      <tbl:hidden 
230        name="plate_id" 
231        value="<%=String.valueOf(plateId)%>" 
232      />
233      <tbl:hidden 
234        name="callback" 
235        value="<%=callback%>" 
236        skip="<%=callback == null%>" 
237      />
238      <tbl:columndef 
239        id="row"
240        property="row"
241        datatype="int"
242        title="Row"
243        sortable="true" 
244        filterable="true"
245        exportable="true"
246        enumeration="<%=rows%>"
247        show="always"
248        formatter="<%=new WellCoordinateFormatter(true)%>" 
249      />
250      <tbl:columndef 
251        id="column"
252        property="column"
253        datatype="int"
254        title="Column"
255        sortable="true" 
256        filterable="true"
257        exportable="true"
258        show="always" 
259        formatter="<%=new WellCoordinateFormatter(false)%>" 
260      />
261      <tbl:columndef 
262        id="id"
263        clazz="uniquecol"
264        property="id"
265        datatype="int"
266        title="ID"
267        sortable="true"
268        filterable="true"
269        exportable="true"
270      />
271      <tbl:columndef 
272        id="parent"
273        title="Parent"
274      />
275      <tbl:columndef
276        id="reporterList"
277        property="$rpt.£reporterListScores"
278        datatype="int"
279        title="[Rep] Reporter list"
280        filterable="true"
281        enumeration="<%=Base.getReporterListsEnum(dc)%>"
282        multiple="false"
283      />
284      <tbl:columndef 
285        id="reporter.name"
286        property="reporter.name"
287        datatype="string"
288        title="[Rep] Name"
289        sortable="true" 
290        filterable="true"
291        exportable="true"
292      />
293      <tbl:columndef 
294        id="reporter.externalId"
295        clazz="uniquecol"
296        property="reporter.externalId"
297        datatype="string"
298        title="[Rep] ID"
299        sortable="true" 
300        filterable="true"
301        exportable="true"
302      />
303      <tbl:columndef 
304        id="reporter.symbol"
305        property="reporter.symbol"
306        datatype="string"
307        title="[Rep] Gene symbol"
308        sortable="true" 
309        filterable="true"
310        exportable="true"
311      />
312      <tbl:columndef 
313        id="reporter.description"
314        property="reporter.description"
315        datatype="string"
316        title="[Rep] Description" 
317        sortable="true" 
318        filterable="true" 
319        exportable="true"
320      />
321      <tbl:columndef 
322        id="reporter.entryDate"
323        property="reporter.entryDate"
324        datatype="date"
325        title="[Rep] Registered"
326        sortable="true" 
327        filterable="true"
328        exportable="true"
329        formatter="<%=dateFormatter%>"
330      />
331      <tbl:columndef 
332        id="reporter.lastUpdate"
333        property="reporter.lastUpdate"
334        datatype="date"
335        title="[Rep] Last update" 
336        sortable="true" 
337        filterable="true" 
338        exportable="true"
339        formatter="<%=dateTimeFormatter%>"
340      />
341      <%
342      Enumeration<String, String> types = new Enumeration<String, String>();
343      ItemResultList<ReporterType> reporterTypes = typeQuery.list(dc);
344      types.add("", "- none -");
345      for (ReporterType rt : reporterTypes)
346      {
347        types.add(Integer.toString(rt.getId()), HTML.encodeTags(rt.getName()));
348      }
349      %>
350      <tbl:columndef 
351        id="reporter.reporterType"
352        property="reporter.reporterType"
353        sortproperty="reporter.reporterType.name"
354        exportproperty="reporter.reporterType.name"
355        datatype="int"
356        enumeration="<%=types%>"
357        title="[Rep] Type"
358        sortable="true" 
359        filterable="true"
360        exportable="true"
361      />
362      <%
363      if (reporterProperties != null)
364      {
365        for (ExtendedProperty ep : reporterProperties)
366        {
367          String name = ep.getName();
368          %>
369          <tbl:columndef
370            id="<%="reporter."+name%>"
371            property="<%="reporter."+name%>"
372            datatype="<%=ep.getType().getStringValue()%>"
373            title="<%="[Rep] "+HTML.encodeTags(ep.getTitle())%>"
374            sortable="true"
375            filterable="true"
376            exportable="true"
377            formatter="<%=FormatterFactory.getExtendedPropertyFormatter(sc, ep)%>"
378          />
379          <%
380        }
381      }
382      %>
383      <%
384      for (AnnotationType at : annotationTypes)
385      {
386        Enumeration<String, String> annotationEnum = null;
387        Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
388        if (at.isEnumeration())
389        {
390          annotationEnum = new Enumeration<String, String>();
391          List<?> values = at.getValues();
392          for (Object value : values)
393          {
394            String encoded = formatter.format(value);
395            annotationEnum.add(encoded, encoded);
396          }
397        }
398        %>
399        <tbl:columndef 
400          id="<%="at"+at.getId()%>"
401          title="<%=HTML.encodeTags(at.getName())+" [A]"%>" 
402          property="<%="#"+at.getId()%>"
403          annotation="true"
404          datatype="<%=at.getValueType().getStringValue()%>"
405          enumeration="<%=annotationEnum%>"
406          sortable="false" 
407          filterable="true" 
408          exportable="true"
409          formatter="<%=formatter%>"
410          unit="<%=at.getDefaultUnit()%>"
411        />
412        <%
413      }
414      %>
415      <tbl:columndef
416        id="permission"
417        title="Permission"
418      />
419      <tbl:toolbar
420        visible="<%=mode.hasToolbar()%>"
421        >
422        <tbl:button 
423          image="columns.gif" 
424          onclick="configureColumns()" 
425          title="Columns&hellip;" 
426          tooltip="Show, hide and re-order columns" 
427        />
428        <tbl:button
429          image="add.png"
430          onclick="newReporterList()"
431          title="New reporter list&hellip;"
432          tooltip="Create a new reporter list from matching wells"
433          visible="<%=sc.hasPermission(Permission.CREATE, Item.REPORTERLIST)%>"
434        />
435        <tbl:button 
436          image="import.gif" 
437          onclick="runPlugin('ImportItems')" 
438          title="Import&hellip;" 
439          tooltip="Import data" 
440          visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
441        />
442        <tbl:button 
443          image="export.gif" 
444          onclick="runPlugin('ExportItems')" 
445          title="Export&hellip;" 
446          tooltip="Export data" 
447          visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
448        />
449        <tbl:button 
450          image="runplugin.gif" 
451          onclick="runPlugin('RunListPlugin')" 
452          title="Run plugin&hellip;" 
453          tooltip="Run a plugin" 
454          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
455        />
456        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 
457          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
458      </tbl:toolbar>
459      <tbl:navigator
460        page="<%=cc.getPage()%>" 
461        rowsperpage="<%=cc.getRowsPerPage()%>" 
462        totalrows="<%=wells == null ? 0 : wells.getTotalCount()%>" 
463        visible="<%=mode.hasNavigator()%>"
464      />
465      <tbl:data>
466        <tbl:columns>
467        <tbl:presetselector 
468          clazz="columnheader"
469          colspan="3"
470          onchange="presetOnChange()"
471        />
472        </tbl:columns>
473         
474        <tr>
475          <tbl:header 
476            clazz="index"
477            >&nbsp;</tbl:header>
478          <tbl:header 
479            clazz="check" 
480            visible="<%=mode.hasCheck()%>"
481            ><base:icon 
482              image="check_uncheck.gif" 
483              tooltip="Check/uncheck all" 
484              onclick="Forms.checkUncheck(document.forms[formId])" style="align: left;"
485            /></tbl:header>
486          <tbl:header 
487            clazz="check" 
488            visible="<%=mode.hasRadio()%>"
489            />
490          <tbl:header 
491            clazz="icons" 
492            visible="<%=mode.hasIcons()%>"
493            >&nbsp;</tbl:header>
494          <tbl:propertyfilter />
495        </tr>
496   
497          <tbl:rows>
498          <%
499          int index = cc.getPage()*cc.getRowsPerPage();
500          int selectedItemId = cc.getId();
501          if (wells != null)
502          {           
503            while (wells.hasNext())
504            {
505              Well item = wells.next();
506              int itemId = item.getId();
507              boolean writePermission = item.hasPermission(Permission.WRITE);
508              String tooltip = mode.isSelectionMode() ? 
509                  "Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); 
510              index++;
511              numListed++;
512              %>
513              <tbl:row>
514                <tbl:header 
515                  clazz="index"
516                  ><%=index%></tbl:header>
517                <tbl:header 
518                  clazz="check" 
519                  visible="<%=mode.hasCheck()%>"
520                  ><input 
521                      type="checkbox" 
522                      name="<%=itemId%>" 
523                      value="<%=itemId%>" 
524                      title="TODO" 
525                      <%=cc.getSelected().contains(itemId) ? "checked" : ""%>
526                    ></tbl:header>
527                <tbl:header 
528                  clazz="check" 
529                  visible="<%=mode.hasRadio()%>"
530                  ><input 
531                      type="radio" 
532                      name="item_id" 
533                      value="<%=itemId%>" 
534                      title="TODO" 
535                      <%=selectedItemId == itemId ? "checked" : ""%>
536                    ></tbl:header>
537                <tbl:header 
538                  clazz="icons" 
539                  visible="<%=mode.hasIcons()%>"
540                  >&nbsp;</tbl:header>
541                <tbl:cell column="row"><div class="link" 
542                  onclick="itemOnClick(<%=writePermission ? "event" : null%>, <%=itemId%>)" 
543                  title="<%=tooltip%>"><tbl:cellvalue value="<%=item.getRow()%>" /></div></tbl:cell>
544                <tbl:cell column="column"><tbl:cellvalue value="<%=item.getColumn()%>"/></tbl:cell>
545                <tbl:cell column="id"><%=item.getId()%></tbl:cell>
546                <tbl:cell column="parent">
547                  <%
548                  try
549                  {
550                    Well parent = item.getParent();
551                    if (parent == null)
552                    {
553                      %>
554                      <i>- none -</i>
555                      <%
556                    }
557                    else
558                    {
559                      %>
560                      <%=Base.getLink(ID, 
561                        parent.getPlate().getName() + " [" + parent.getRow() + ", " + parent.getColumn() + "]", 
562                        Item.WELL, parent.getId(), true)%>
563                      <%
564                    }
565                  }
566                  catch (PermissionDeniedException ex)
567                  {
568                    %>
569                    <i>- denied -</i>
570                    <%
571                  }
572                  %>
573                </tbl:cell>
574                <%
575                ReporterData reporter = item.getReporter();
576                if (reporter == null)
577                {
578                  %>
579                  <tbl:cell column="reporter.name"><i>- none -</i></tbl:cell>
580                  <tbl:cell column="reporter.externalId"><i>- none -</i></tbl:cell>
581                  <%
582                }
583                else
584                {
585                  %>
586                  <tbl:cell column="reporter.name"><%=Base.getLink(ID, reporter.getName(), Item.REPORTER, reporter.getId(), true)%></tbl:cell>
587                  <tbl:cell column="reporter.externalId"><%=HTML.encodeTags(reporter.getExternalId())%></tbl:cell>
588                  <tbl:cell column="reporter.symbol"><%=HTML.encodeTags(reporter.getSymbol())%></tbl:cell>
589                  <tbl:cell column="reporter.description"><%=HTML.encodeTags(reporter.getDescription())%></tbl:cell>
590                  <tbl:cell column="reporter.entryDate" value="<%=reporter.getEntryDate()%>" />
591                  <tbl:cell column="reporter.lastUpdate" value="<%=reporter.getLastUpdate()%>" />
592                  <tbl:cell column="reporter.reporterType"
593                    ><base:propertyvalue 
594                      dbcontrol="<%=dc%>" 
595                      item="<%=reporter%>" 
596                      property="reporterType"
597                      enableEditLink="<%=mode.hasEditLink()%>" 
598                      enablePropertyLink="<%=mode.hasPropertyLink()%>"
599                    /></tbl:cell>
600                  <%
601                  if (reporterProperties != null)
602                  {
603                    for (ExtendedProperty ep : reporterProperties)
604                    {
605                      String name = ep.getName();
606                      %>
607                      <tbl:cell column="<%="reporter."+name%>"><tbl:cellvalue value="<%=reporter.getExtended(name)%>" /></tbl:cell>
608                      <%
609                    }
610                  }
611                }
612                AnnotationSet as = item.isAnnotated() ? item.getAnnotationSet() : null;
613                if (as != null)
614                {
615                  for (AnnotationType at : annotationTypes)
616                  {
617                    if (as.hasAnnotation(at))
618                    {
619                      Annotation a = as.getAnnotation(at);
620                      String suffix = a.getUnitSymbol(null);
621                      if (suffix != null) suffix = "&nbsp;" + suffix;
622                      %>
623                      <tbl:cell 
624                        column="<%="at"+at.getId()%>"
625                        ><tbl:cellvalue 
626                          list="<%=a.getValues(null)%>"
627                          suffix="<%=suffix%>"
628                      /></tbl:cell>
629                      <%
630                    }
631                  }
632                }
633                %>
634                <tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell>
635              </tbl:row>
636              <%
637            }
638          }
639          %>
640          </tbl:rows>
641        </tbl:data>
642      <%
643      if (numListed == 0)
644      {
645        %>
646        <tbl:panel><%=wells == null || wells.getTotalCount() == 0 ? "No wells were found" : "No wells on this page. Please select another page!" %></tbl:panel>
647        <%
648      }
649      else
650      {
651        %>
652        <tbl:navigator
653          page="<%=cc.getPage()%>" 
654          rowsperpage="<%=cc.getRowsPerPage()%>" 
655          totalrows="<%=wells == null ? 0 : wells.getTotalCount()%>" 
656          visible="<%=mode.hasNavigator()%>"
657          locked="true"
658        />
659        <%
660      }
661      %>
662    </tbl:table>
663    <base:buttongroup align="center">
664      <base:button onclick="returnSelected();" title="Ok" visible="<%=mode.hasOkButton()%>" />
665      <base:button onclick="window.close();" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
666      <base:button onclick="window.close();" title="Close" visible="<%=mode.hasCloseButton()%>" />
667    </base:buttongroup>
668 
669    </t:tab>
670    </t:tabcontrol>
671
672 
673  </base:body>
674  </base:page>
675  <%
676}
677finally
678{
679  if (wells != null) wells.close();
680  if (dc != null) dc.close();
681}
682%>
Note: See TracBrowser for help on using the repository browser.