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