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

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

References #1015: Add reporter list from tables that list reporters/reporter info

It is now possible to create reporter lists from features, wells and raw data, eg. all DataQuery?-based item types. Creating the lists using queries from the dynamic database needs a different solution.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 21.4 KB
Line 
1<%-- $Id: list_features.jsp 4305 2008-05-21 11:11:20Z 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    function newReporterList()
159    {
160      Table.submitToPopup(formId, 'CreateReporterList', 540, 400);
161    }
162    </script>
163  </base:head>
164 
165  <base:body>
166    <p>
167    <p:path>
168      <p:pathelement title="Array designs" href="<%="../index.jsp?ID="+ID%>" />
169      <p:pathelement title="<%=HTML.encodeTags(design.getName())%>" />
170    </p:path>
171
172    <t:tabcontrol id="main" active="images" switch="switchTab">
173    <t:tab id="properties" title="Properties" />
174    <t:tab id="annotations" title="Annotations" />
175   
176    <t:tab id="images" title="Features">
177   
178    <%
179    if (cc.getMessage() != null)
180    {
181      %>
182      <div class="error"><%=cc.getMessage()%></div>
183      <%
184      cc.setMessage(null);
185    }
186    %>
187    <tbl:table 
188      id="features" 
189      clazz="itemlist" 
190      columns="<%=cc.getSetting("columns")%>"
191      sortby="<%=cc.getSortProperty()%>" 
192      direction="<%=cc.getSortDirection()%>"
193      title="<%=title%>"
194      action="index.jsp"
195      sc="<%=sc%>"
196      item="<%=itemType%>"
197      >
198      <tbl:hidden 
199        name="mode" 
200        value="<%=mode.getName()%>" 
201      />
202      <tbl:hidden 
203        name="arraydesign_id" 
204        value="<%=String.valueOf(arrayDesignId)%>" 
205      />
206      <tbl:hidden 
207        name="callback" 
208        value="<%=callback%>" 
209        skip="<%=callback == null%>" 
210      />
211      <tbl:columndef 
212        id="position"
213        property="position"
214        datatype="int"
215        title="Position"
216        sortable="true" 
217        filterable="true"
218        exportable="true"
219        show="<%=fiMethod == FeatureIdentificationMethod.FEATURE_ID ? "auto" : "always"%>"
220      />
221      <tbl:columndef 
222        id="externalId"
223        property="externalId"
224        datatype="string"
225        title="Feature ID"
226        sortable="true" 
227        filterable="true"
228        exportable="true"
229        show="<%=fiMethod == FeatureIdentificationMethod.FEATURE_ID ? "always" : "auto"%>"
230      />
231      <tbl:columndef 
232        id="block"
233        property="arrayDesignBlock.blockNumber"
234        datatype="int"
235        title="Block"
236        sortable="true" 
237        filterable="true"
238        exportable="true"
239      />
240      <tbl:columndef 
241        id="metaGridX"
242        property="arrayDesignBlock.metaGridX"
243        datatype="int"
244        title="Meta grid X"
245        sortable="true" 
246        filterable="true"
247        exportable="true"
248      />
249      <tbl:columndef 
250        id="metaGridY"
251        property="arrayDesignBlock.metaGridY"
252        datatype="int"
253        title="Meta grid Y"
254        sortable="true" 
255        filterable="true"
256        exportable="true"
257      />
258      <tbl:columndef 
259        id="row"
260        property="row"
261        datatype="int"
262        title="Row"
263        sortable="true" 
264        filterable="true"
265        exportable="true"
266      />
267      <tbl:columndef 
268        id="column"
269        property="column"
270        datatype="int"
271        title="Column"
272        sortable="true" 
273        filterable="true"
274        exportable="true"
275      />
276      <tbl:columndef 
277        id="blockSizeX"
278        property="arrayDesignBlock.blockSizeX"
279        datatype="int"
280        title="Block size X"
281        sortable="true" 
282        filterable="true"
283        exportable="true"
284      />
285      <tbl:columndef 
286        id="blockSizeY"
287        property="arrayDesignBlock.blockSizeY"
288        datatype="int"
289        title="Block size Y"
290        sortable="true" 
291        filterable="true"
292        exportable="true"
293      />
294      <tbl:columndef 
295        id="originX"
296        property="arrayDesignBlock.originX"
297        datatype="int"
298        title="Origin X"
299        sortable="true" 
300        filterable="true"
301        exportable="true"
302      />
303      <tbl:columndef 
304        id="originY"
305        property="arrayDesignBlock.originY"
306        datatype="int"
307        title="Origin Y"
308        sortable="true" 
309        filterable="true"
310        exportable="true"
311      />
312      <tbl:columndef 
313        id="spacingX"
314        property="arrayDesignBlock.spacingX"
315        datatype="int"
316        title="Spacing X"
317        sortable="true" 
318        filterable="true"
319        exportable="true"
320      />
321      <tbl:columndef 
322        id="spacingY"
323        property="arrayDesignBlock.spacingY"
324        datatype="int"
325        title="Spacing Y"
326        sortable="true" 
327        filterable="true"
328        exportable="true"
329      />
330      <tbl:columndef 
331        id="diameter"
332        property="arrayDesignBlock.featureDiameter"
333        datatype="int"
334        title="Diameter"
335        sortable="true" 
336        filterable="true"
337        exportable="true"
338      />
339      <tbl:columndef
340        id="reporterList"
341        property="$rpt.£reporterListScores"
342        datatype="int"
343        title="[Rep] Reporter list"
344        filterable="true"
345        enumeration="<%=Base.getReporterListsEnum(dc)%>"
346        multiple="false"
347      />
348      <tbl:columndef 
349        id="reporter.name"
350        property="reporter.name"
351        datatype="string"
352        title="[Rep] Name"
353        sortable="true" 
354        filterable="true"
355        exportable="true"
356      />
357      <tbl:columndef 
358        id="reporter.externalId"
359        property="reporter.externalId"
360        datatype="string"
361        title="[Rep] ID"
362        sortable="true" 
363        filterable="true"
364        exportable="true"
365      />
366      <tbl:columndef 
367        id="reporter.symbol"
368        property="reporter.symbol"
369        datatype="string"
370        title="[Rep] Gene symbol"
371        sortable="true" 
372        filterable="true"
373        exportable="true"
374      />
375      <tbl:columndef 
376        id="reporter.description"
377        property="reporter.description"
378        datatype="string"
379        title="[Rep] Description" 
380        sortable="true" 
381        filterable="true" 
382        exportable="true"
383      />
384      <tbl:columndef 
385        id="reporter.lastUpdate"
386        property="reporter.lastUpdate"
387        datatype="date"
388        title="[Rep] Last update" 
389        sortable="true" 
390        filterable="true" 
391        exportable="true"
392        formatter="<%=dateFormatter%>"
393      />
394      <%
395      Enumeration<String, String> types = new Enumeration<String, String>();
396      ItemResultList<ReporterType> reporterTypes = typeQuery.list(dc);
397      types.add("", "- none -");
398      for (ReporterType rt : reporterTypes)
399      {
400        types.add(Integer.toString(rt.getId()), HTML.encodeTags(rt.getName()));
401      }
402      %>
403      <tbl:columndef 
404        id="reporter.reporterType"
405        property="reporter.reporterType"
406        sortproperty="reporter.reporterType.name"
407        exportproperty="reporter.reporterType.name"
408        datatype="int"
409        enumeration="<%=types%>"
410        title="[Rep] Type"
411        sortable="true" 
412        filterable="true"
413        exportable="true"
414      />
415      <%
416      if (reporterProperties != null)
417      {
418        for (ExtendedProperty ep : reporterProperties)
419        {
420          String name = ep.getName();
421          %>
422          <tbl:columndef
423            id="<%="reporter."+name%>"
424            property="<%="reporter."+name%>"
425            datatype="<%=ep.getType().getStringValue()%>"
426            title="<%="[Rep] "+HTML.encodeTags(ep.getTitle())%>"
427            sortable="true"
428            filterable="true"
429            exportable="true"
430            formatter="<%=FormatterFactory.getExtendedPropertyFormatter(sc, ep)%>"
431          />
432          <%
433        }
434      }
435      %>
436      <tbl:columndef 
437        id="well.row"
438        property="well.row"
439        datatype="int"
440        title="[Well] Row" 
441        sortable="true" 
442        filterable="true" 
443        exportable="true"
444      />
445      <tbl:columndef 
446        id="well.column"
447        property="well.column"
448        datatype="int"
449        title="[Well] Column" 
450        sortable="true" 
451        filterable="true" 
452        exportable="true"
453      />
454      <tbl:columndef 
455        id="well.plate"
456        property="well.plate.name"
457        datatype="string"
458        title="[Well] Plate" 
459        sortable="true" 
460        filterable="true" 
461        exportable="true"
462      />
463      <tbl:toolbar
464        visible="<%=mode.hasToolbar()%>"
465        >
466        <tbl:button 
467          image="columns.gif" 
468          onclick="configureColumns()" 
469          title="Columns&hellip;" 
470          tooltip="Show, hide and re-order columns" 
471        />
472        <tbl:button
473          image="add.png"
474          onclick="newReporterList()"
475          title="New reporter list&hellip;"
476          tooltip="Create a new reporter list from matching features"
477          visible="<%=sc.hasPermission(Permission.CREATE, Item.REPORTERLIST)%>"
478        />
479        <tbl:button 
480          image="import.gif" 
481          onclick="runPlugin('ImportItems')" 
482          title="Import&hellip;" 
483          tooltip="Import data" 
484          visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
485        />
486        <tbl:button 
487          image="export.gif" 
488          onclick="runPlugin('ExportItems')" 
489          title="Export&hellip;" 
490          tooltip="Export data" 
491          visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
492        />
493        <tbl:button 
494          image="runplugin.gif" 
495          onclick="runPlugin('RunListPlugin')" 
496          title="Run plugin&hellip;" 
497          tooltip="Run a plugin" 
498          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
499        />
500      </tbl:toolbar>
501      <tbl:navigator
502        page="<%=cc.getPage()%>" 
503        rowsperpage="<%=cc.getRowsPerPage()%>" 
504        totalrows="<%=features == null ? 0 : features.getTotalCount()%>" 
505        visible="<%=mode.hasNavigator()%>"
506      />
507      <tbl:data>
508        <tbl:columns>
509        <tbl:presetselector 
510          clazz="columnheader"
511          colspan="3"
512          onchange="presetOnChange()"
513        />
514        </tbl:columns>
515         
516        <tr>
517          <tbl:header 
518            clazz="index"
519            >&nbsp;</tbl:header>
520          <tbl:header 
521            clazz="check" 
522            visible="<%=mode.hasCheck()%>"
523            ><base:icon 
524              image="check_uncheck.gif" 
525              tooltip="Check/uncheck all" 
526              onclick="Forms.checkUncheck(document.forms[formId])" style="align: left;"
527            /></tbl:header>
528          <tbl:header 
529            clazz="check" 
530            visible="<%=mode.hasRadio()%>"
531            />
532          <tbl:header 
533            clazz="icons" 
534            visible="<%=mode.hasIcons()%>"
535            >&nbsp;</tbl:header>
536          <tbl:propertyfilter />
537        </tr>
538   
539          <tbl:rows>
540          <%
541          int index = cc.getPage()*cc.getRowsPerPage();
542          int selectedItemId = Values.getInt(request.getParameter("item_id"));
543          if (features != null)
544          {
545            String tooltip = mode.isSelectionMode() ? 
546              "Select this item" : "View this item";
547            while (features.hasNext())
548            {
549              FeatureData item = features.next();
550              ArrayDesignBlock block = Feature.getArrayDesignBlock(dc, item);
551              int itemId = item.getId();
552              index++;
553              numListed++;
554              %>
555              <tbl:row>
556                <tbl:header 
557                  clazz="index"
558                  ><%=index%></tbl:header>
559                <tbl:header 
560                  clazz="check" 
561                  visible="<%=mode.hasCheck()%>"
562                  ><input 
563                      type="checkbox" 
564                      name="<%=itemId%>" 
565                      value="<%=itemId%>" 
566                      title="TODO" 
567                      <%=request.getParameter(Integer.toString(itemId)) == null ? "" : "checked"%> 
568                    ></tbl:header>
569                <tbl:header 
570                  clazz="check" 
571                  visible="<%=mode.hasRadio()%>"
572                  ><input 
573                      type="radio" 
574                      name="item_id" 
575                      value="<%=itemId%>" 
576                      title="TODO" 
577                      <%=selectedItemId == itemId ? "checked" : ""%>
578                    ></tbl:header>
579                <tbl:header 
580                  clazz="icons" 
581                  visible="<%=mode.hasIcons()%>"
582                  ></tbl:header>
583                <tbl:cell column="position"><div class="link" onclick="itemOnClick(event, <%=itemId%>)" 
584                  title="<%=tooltip%>"><%=item.getPosition()%></div></tbl:cell>
585                <tbl:cell column="externalId"><div class="link" onclick="itemOnClick(event, <%=itemId%>)" 
586                  title="<%=tooltip%>"><%=HTML.encodeTags(item.getExternalId())%></div></tbl:cell>
587                <tbl:cell column="block"><%=block.getBlockNumber()%></tbl:cell>
588                <tbl:cell column="row"><%=item.getRow()%></tbl:cell>
589                <tbl:cell column="column"><%=item.getColumn()%></tbl:cell>
590                <tbl:cell column="metaGridX"><%=block.getMetaGridX()%></tbl:cell>
591                <tbl:cell column="metaGridY"><%=block.getMetaGridY()%></tbl:cell>
592                <tbl:cell column="blockSizeX"><%=block.getBlockSizeX()%></tbl:cell>
593                <tbl:cell column="blockSizeY"><%=block.getBlockSizeY()%></tbl:cell>
594                <tbl:cell column="originX"><%=block.getOriginX()%></tbl:cell>
595                <tbl:cell column="originY"><%=block.getOriginY()%></tbl:cell>
596                <tbl:cell column="spacingX"><%=block.getSpacingX()%></tbl:cell>
597                <tbl:cell column="spacingY"><%=block.getSpacingY()%></tbl:cell>
598                <tbl:cell column="diameter"><%=block.getFeatureDiameter()%></tbl:cell>
599                <%
600                ReporterData reporter = item.getReporter();
601                if (reporter == null)
602                {
603                  %>
604                  <tbl:cell column="reporter.name"><i>- none -</i></tbl:cell>
605                  <tbl:cell column="reporter.externalId"><i>- none -</i></tbl:cell>
606                  <tbl:cell column="reporter.symbol"><i>- none -</i></tbl:cell>
607                  <tbl:cell column="reporter.description"><i>- none -</i></tbl:cell>
608                  <tbl:cell column="reporter.lastUpdate"><i>- none -</i></tbl:cell>
609                  <tbl:cell column="reporter.reporterType"><i>- none -</i></tbl:cell>
610                  <%
611                  if (reporterProperties != null)
612                  {
613                    for (ExtendedProperty ep : reporterProperties)
614                    {
615                      String name = ep.getName();
616                      %>
617                      <tbl:cell column="<%="reporter."+name%>"><i>- none -</i></tbl:cell>
618                      <%
619                    }
620                  }
621                }
622                else
623                {
624                  %>
625                  <tbl:cell column="reporter.name"><%=Base.getLink(ID, reporter.getName(), Item.REPORTER, reporter.getId(), true)%></tbl:cell>
626                  <tbl:cell column="reporter.externalId"><%=HTML.encodeTags(reporter.getExternalId())%></tbl:cell>
627                  <tbl:cell column="reporter.symbol"><%=HTML.encodeTags(reporter.getSymbol())%></tbl:cell>
628                  <tbl:cell column="reporter.description"><%=HTML.encodeTags(reporter.getDescription())%></tbl:cell>
629                  <tbl:cell column="reporter.lastUpdate" value="<%=reporter.getLastUpdate()%>" />
630                  <tbl:cell column="reporter.reporterType"
631                    ><base:propertyvalue 
632                      dbcontrol="<%=dc%>" 
633                      item="<%=reporter%>" 
634                      property="reporterType"
635                      enableEditLink="<%=mode.hasEditLink()%>" 
636                      enablePropertyLink="<%=mode.hasPropertyLink()%>"
637                    /></tbl:cell>
638                  <%
639                  if (reporterProperties != null)
640                  {
641                    for (ExtendedProperty ep : reporterProperties)
642                    {
643                      String name = ep.getName();
644                      %>
645                      <tbl:cell column="<%="reporter."+name%>"><tbl:cellvalue value="<%=reporter.getExtended(name)%>" /></tbl:cell>
646                      <%
647                    }
648                  }
649                }
650                %>
651                <%
652                Well well = null;
653                boolean readWell = true;
654                try
655                {
656                  well = Feature.getWell(dc, item);
657                }
658                catch (PermissionDeniedException ex)
659                {
660                  readWell = false;
661                }
662                if (!readWell)
663                {
664                  %>
665                  <tbl:cell column="well.row"><i>- denied -</i></tbl:cell>
666                  <tbl:cell column="well.column"><i>- denied -</i></tbl:cell>
667                  <tbl:cell column="well.plate"><i>- denied -</i></tbl:cell>
668                  <%
669                }
670                else if (well == null)
671                {
672                  %>
673                  <tbl:cell column="well.row"><i>- none -</i></tbl:cell>
674                  <tbl:cell column="well.column"><i>- none -</i></tbl:cell>
675                  <tbl:cell column="well.plate"><i>- none -</i></tbl:cell>
676                  <%
677                }
678                else
679                {
680                  %>
681                  <tbl:cell column="well.row"><%=well.getRow()%></tbl:cell>
682                  <tbl:cell column="well.column"><%=well.getColumn()%></tbl:cell>
683                  <tbl:cell column="well.plate"><%=Base.getLinkedName(ID, well.getPlate(), false, true)%></tbl:cell>
684                  <%
685                }
686                %>
687              </tbl:row>
688              <%
689            }
690          }
691          %>
692          </tbl:rows>
693        </tbl:data>
694      <%
695      if (numListed == 0)
696      {
697        %>
698        <tbl:panel><%=features == null || features.getTotalCount() == 0 ? "No features were found" : "No features on this page. Please select another page!" %></tbl:panel>
699        <%
700      }
701      else
702      {
703        %>
704        <tbl:navigator
705          page="<%=cc.getPage()%>" 
706          rowsperpage="<%=cc.getRowsPerPage()%>" 
707          totalrows="<%=features == null ? 0 : features.getTotalCount()%>" 
708          visible="<%=mode.hasNavigator()%>"
709          locked="true"
710        />
711        <%
712      }
713      %>
714    </tbl:table>
715    <base:buttongroup align="center">
716      <base:button onclick="returnSelected();" title="Ok" visible="<%=mode.hasOkButton()%>" />
717      <base:button onclick="window.close();" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
718      <base:button onclick="window.close();" title="Close" visible="<%=mode.hasCloseButton()%>" />
719    </base:buttongroup>
720   
721    </t:tab>
722    </t:tabcontrol>
723 
724  </base:body>
725  </base:page>
726  <%
727}
728finally
729{
730  if (features != null) features.close();
731  if (dc != null) dc.close();
732}
733%>
Note: See TracBrowser for help on using the repository browser.