source: trunk/www/lims/arraydesigns/features/list_features.jsp @ 4302

Last change on this file since 4302 was 4302, checked in by Nicklas Nordborg, 15 years ago

References #1016: Filter table using a reporter list

I think this should now be working, but I may have missed a list somewhere. Please test.

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