source: trunk/www/views/rawbioassays/rawdata/list_rawdata.jsp @ 4387

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

Fixes #1033: Mark columns containing unique information in list views

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 26.3 KB
Line 
1<%-- $Id: list_rawdata.jsp 4387 2008-08-11 09:09:46Z 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    function newReporterList()
165    {
166      Table.submitToPopup(formId, 'CreateReporterList', 540, 400);
167    }
168    </script>
169  </base:head>
170 
171  <base:body>
172    <p>
173    <p:path>
174      <p:pathelement title="Raw bioassays" href="<%="../index.jsp?ID="+ID%>" />
175      <p:pathelement title="<%=HTML.encodeTags(rawBioAssay.getName())%>" />
176    </p:path>
177   
178   
179    <t:tabcontrol id="main" active="rawdata" switch="switchTab">
180    <t:tab id="properties" title="Properties" />
181    <t:tab id="annotations" title="Annotations &amp; parameters" 
182      tooltip="View annotation values and protocol parameters" />
183   
184    <t:tab id="rawdata" title="Raw data">
185
186    <%
187    if (cc.getMessage() != null)
188    {
189      %>
190      <div class="error"><%=cc.getMessage()%></div>
191      <%
192      cc.setMessage(null);
193    }
194    %>
195    <tbl:table 
196      id="rawdata" 
197      clazz="itemlist" 
198      columns="<%=cc.getSetting("columns")%>"
199      sortby="<%=cc.getSortProperty()%>" 
200      direction="<%=cc.getSortDirection()%>"
201      title="<%=title%>"
202      action="index.jsp"
203      sc="<%=sc%>"
204      item="<%=itemType%>"
205      subcontext="<%=subContext%>"
206      >
207      <tbl:hidden 
208        name="mode" 
209        value="<%=mode.getName()%>" 
210      />
211      <tbl:hidden 
212        name="rawbioassay_id" 
213        value="<%=String.valueOf(rawBioAssayId)%>" 
214      />
215      <tbl:hidden 
216        name="callback" 
217        value="<%=callback%>" 
218        skip="<%=callback == null%>" 
219      />
220      <tbl:columndef 
221        id="position"
222        clazz="uniquecol"
223        property="position"
224        datatype="int"
225        title="[Raw] Position"
226        sortable="true" 
227        filterable="true"
228        exportable="true"
229        show="always" 
230      />
231      <tbl:columndef 
232        id="id"
233        clazz="uniquecol"
234        property="id"
235        datatype="int"
236        title="ID"
237        sortable="true"
238        filterable="true"
239        exportable="true"
240      />
241      <tbl:columndef 
242        id="block"
243        property="block"
244        datatype="int"
245        title="[Raw] Block"
246        sortable="true" 
247        filterable="true"
248        exportable="true"
249      />
250      <tbl:columndef 
251        id="metaGridX"
252        property="metaGridX"
253        datatype="int"
254        title="[Raw] Meta grid X"
255        sortable="true" 
256        filterable="true"
257        exportable="true"
258      />
259      <tbl:columndef 
260        id="metaGridY"
261        property="metaGridY"
262        datatype="int"
263        title="[Raw] Meta grid Y"
264        sortable="true" 
265        filterable="true"
266        exportable="true"
267      />
268      <tbl:columndef 
269        id="row"
270        property="row"
271        datatype="int"
272        title="[Raw] Row"
273        sortable="true" 
274        filterable="true"
275        exportable="true"
276      />
277      <tbl:columndef 
278        id="column"
279        property="column"
280        datatype="int"
281        title="[Raw] Column"
282        sortable="true" 
283        filterable="true"
284        exportable="true"
285      />
286      <tbl:columndef 
287        id="x"
288        property="x"
289        datatype="int"
290        title="[Raw] X"
291        sortable="true" 
292        filterable="true"
293        exportable="true"
294      />
295      <tbl:columndef 
296        id="y"
297        property="y"
298        datatype="int"
299        title="[Raw] Y"
300        sortable="true" 
301        filterable="true"
302        exportable="true"
303      />
304      <tbl:columndef 
305        id="spotImage"
306        title="Spot image"
307      />
308      <%
309      for (RawDataProperty rdp : rawBioAssay.getRawDataType().getProperties())
310      {
311        %>
312        <tbl:columndef
313          id="<%="raw."+rdp.getName()%>"
314          property="<%=rdp.getName()%>"
315          datatype="<%=rdp.getType().getStringValue()%>"
316          title="<%="[Raw] "+HTML.encodeTags(rdp.getTitle())%>"
317          sortable="true" 
318          filterable="true"
319          exportable="true"
320          formatter="<%=FormatterFactory.getExtendedPropertyFormatter(sc, rdp)%>"
321        />
322        <%
323      }
324      %>
325      <tbl:columndef
326        id="reporterList"
327        property="$r.£reporterListScores"
328        datatype="int"
329        title="[Rep] Reporter list"
330        filterable="true"
331        enumeration="<%=Base.getReporterListsEnum(dc)%>"
332        multiple="false"
333      />     
334      <tbl:columndef 
335        id="reporter.name"
336        property="reporter.name"
337        datatype="string"
338        title="[Rep] Name"
339        sortable="true" 
340        filterable="true"
341        exportable="true"
342      />
343      <tbl:columndef 
344        id="reporter.externalId"
345        clazz="uniquecol"
346        property="reporter.externalId"
347        datatype="string"
348        title="[Rep] ID"
349        sortable="true" 
350        filterable="true"
351        exportable="true"
352      />
353      <tbl:columndef 
354        id="reporter.symbol"
355        property="reporter.symbol"
356        datatype="string"
357        title="[Rep] Gene symbol"
358        sortable="true" 
359        filterable="true"
360        exportable="true"
361      />
362      <tbl:columndef 
363        id="reporter.description"
364        property="reporter.description"
365        datatype="string"
366        title="[Rep] Description" 
367        sortable="true" 
368        filterable="true" 
369        exportable="true"
370      />
371      <tbl:columndef 
372        id="reporter.lastUpdate"
373        property="reporter.lastUpdate"
374        datatype="date"
375        title="[Rep] Last update" 
376        sortable="true" 
377        filterable="true" 
378        exportable="true"
379        formatter="<%=dateFormatter%>"
380      />
381      <%
382      Enumeration<String, String> types = new Enumeration<String, String>();
383      ItemResultList<ReporterType> reporterTypes = typeQuery.list(dc);
384      types.add("", "- none -");
385      for (ReporterType rt : reporterTypes)
386      {
387        types.add(Integer.toString(rt.getId()), HTML.encodeTags(rt.getName()));
388      }
389      %>
390      <tbl:columndef 
391        id="reporter.reporterType"
392        property="reporter.reporterType"
393        sortproperty="reporter.reporterType.name"
394        exportproperty="reporter.reporterType.name"
395        datatype="int"
396        enumeration="<%=types%>"
397        title="[Rep] Type"
398        sortable="true" 
399        filterable="true"
400        exportable="true"
401      />
402      <%
403      if (reporterProperties != null)
404      {
405        for (ExtendedProperty ep : reporterProperties)
406        {
407          String name = ep.getName();
408          %>
409          <tbl:columndef
410            id="<%="reporter."+name%>"
411            property="<%="reporter."+name%>"
412            datatype="<%=ep.getType().getStringValue()%>"
413            title="<%="[Rep] "+HTML.encodeTags(ep.getTitle())%>"
414            sortable="true"
415            filterable="true"
416            exportable="true"
417            formatter="<%=FormatterFactory.getExtendedPropertyFormatter(sc, ep)%>"
418          />
419          <%
420        }
421      }
422      %>
423      <tbl:columndef 
424        id="feature.position"
425        clazz="uniquecol"
426        property="feature.position"
427        datatype="int"
428        title="[Feat] Position" 
429        sortable="true" 
430        filterable="true" 
431        exportable="true"
432      />
433      <tbl:columndef 
434        id="feature.externalId"
435        clazz="uniquecol"
436        property="feature.externalId"
437        datatype="string"
438        title="[Feat] Feature ID" 
439        sortable="true" 
440        filterable="true" 
441        exportable="true"
442      />
443      <tbl:columndef 
444        id="feature.block"
445        property="feature.block"
446        datatype="int"
447        title="[Feat] Block"
448        sortable="true" 
449        filterable="true"
450        exportable="true"
451      />
452      <tbl:columndef 
453        id="feature.metaGridX"
454        property="feature.arrayDesignBlock.metaGridX"
455        datatype="int"
456        title="[Feat] Meta grid X"
457        sortable="true" 
458        filterable="true"
459        exportable="true"
460      />
461      <tbl:columndef 
462        id="feature.metaGridY"
463        property="feature.arrayDesignBlock.metaGridY"
464        datatype="int"
465        title="[Feat] Meta grid Y"
466        sortable="true" 
467        filterable="true"
468        exportable="true"
469      />
470      <tbl:columndef 
471        id="feature.row"
472        property="feature.row"
473        datatype="int"
474        title="[Feat] Row"
475        sortable="true" 
476        filterable="true"
477        exportable="true"
478      />
479      <tbl:columndef 
480        id="feature.column"
481        property="feature.column"
482        datatype="int"
483        title="[Feat] Column"
484        sortable="true" 
485        filterable="true"
486        exportable="true"
487      />
488      <tbl:columndef 
489        id="feature.blockSizeX"
490        property="feature.arrayDesignBlock.blockSizeX"
491        datatype="int"
492        title="[Feat] Block size X"
493        sortable="true" 
494        filterable="true"
495        exportable="true"
496      />
497      <tbl:columndef 
498        id="feature.blockSizeY"
499        property="feature.arrayDesignBlock.blockSizeY"
500        datatype="int"
501        title="[Feat] Block size Y"
502        sortable="true" 
503        filterable="true"
504        exportable="true"
505      />
506      <tbl:columndef 
507        id="feature.originX"
508        property="feature.arrayDesignBlock.originX"
509        datatype="int"
510        title="[Feat] Origin X"
511        sortable="true" 
512        filterable="true"
513        exportable="true"
514      />
515      <tbl:columndef 
516        id="feature.originY"
517        property="feature.arrayDesignBlock.originY"
518        datatype="int"
519        title="[Feat] Origin Y"
520        sortable="true" 
521        filterable="true"
522        exportable="true"
523      />
524      <tbl:columndef 
525        id="feature.spacingX"
526        property="feature.arrayDesignBlock.spacingX"
527        datatype="int"
528        title="[Feat] Spacing X"
529        sortable="true" 
530        filterable="true"
531        exportable="true"
532      />
533      <tbl:columndef 
534        id="feature.spacingY"
535        property="feature.arrayDesignBlock.spacingY"
536        datatype="int"
537        title="[Feat] Spacing Y"
538        sortable="true" 
539        filterable="true"
540        exportable="true"
541      />
542      <tbl:columndef 
543        id="well.row"
544        property="feature.well.row"
545        datatype="int"
546        title="[Well] Row" 
547        sortable="true" 
548        filterable="true" 
549        exportable="true"
550      />
551      <tbl:columndef 
552        id="well.column"
553        property="feature.well.column"
554        datatype="int"
555        title="[Well] Column" 
556        sortable="true" 
557        filterable="true" 
558        exportable="true"
559      />
560      <tbl:columndef 
561        id="well.plate"
562        property="feature.well.plate.name"
563        datatype="string"
564        title="[Well] Plate" 
565        sortable="true" 
566        filterable="true" 
567        exportable="true"
568      />
569      <tbl:toolbar
570        visible="<%=mode.hasToolbar()%>"
571        >
572        <tbl:button 
573          image="columns.gif" 
574          onclick="configureColumns()" 
575          title="Columns&hellip;" 
576          tooltip="Show, hide and re-order columns" 
577        />
578        <tbl:button
579          image="add.png"
580          onclick="newReporterList()"
581          title="New reporter list&hellip;"
582          tooltip="Create a new reporter list from matching spots"
583          visible="<%=sc.hasPermission(Permission.CREATE, Item.REPORTERLIST)%>"
584        />
585        <tbl:button 
586          image="import.gif" 
587          onclick="runPlugin('ImportItems')" 
588          title="Import&hellip;" 
589          tooltip="Import data" 
590          visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
591        />
592        <tbl:button 
593          image="export.gif" 
594          onclick="runPlugin('ExportItems')" 
595          title="Export&hellip;" 
596          tooltip="Export data" 
597          visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
598        />
599        <tbl:button 
600          image="runplugin.gif" 
601          onclick="runPlugin('RunListPlugin')" 
602          title="Run plugin&hellip;" 
603          tooltip="Run a plugin" 
604          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
605        />
606      </tbl:toolbar>
607      <tbl:navigator
608        page="<%=cc.getPage()%>" 
609        rowsperpage="<%=cc.getRowsPerPage()%>" 
610        totalrows="<%=rawData == null ? 0 : rawData.getTotalCount()%>" 
611        visible="<%=mode.hasNavigator()%>"
612      />
613      <tbl:data>
614        <tbl:columns>
615        <tbl:presetselector 
616          clazz="columnheader"
617          colspan="3"
618          onchange="presetOnChange()"
619        />
620        </tbl:columns>
621         
622        <tr>
623          <tbl:header 
624            clazz="index"
625            >&nbsp;</tbl:header>
626          <tbl:header 
627            clazz="check" 
628            visible="<%=mode.hasCheck()%>"
629            ><base:icon 
630              image="check_uncheck.gif" 
631              tooltip="Check/uncheck all" 
632              onclick="Forms.checkUncheck(document.forms[formId])" style="align: left;"
633            /></tbl:header>
634          <tbl:header 
635            clazz="check" 
636            visible="<%=mode.hasRadio()%>"
637            />
638          <tbl:header 
639            clazz="icons" 
640            visible="<%=mode.hasIcons()%>"
641            >&nbsp;</tbl:header>
642          <tbl:propertyfilter />
643        </tr>
644   
645          <tbl:rows>
646          <%
647          int index = cc.getPage()*cc.getRowsPerPage();
648          int selectedItemId = cc.getId();
649          boolean hasSpotImages = rawBioAssay.hasSpotImages();
650          if (rawData != null)
651          {
652            String tooltip = mode.isSelectionMode() ?
653              "Select this item" : "View this item";
654            while (rawData.hasNext())
655            {
656              RawData item = rawData.next();
657              int itemId = item.getId();
658              index++;
659              numListed++;
660              %>
661              <tbl:row>
662                <tbl:header 
663                  clazz="index"
664                  ><%=index%></tbl:header>
665                <tbl:header 
666                  clazz="check" 
667                  visible="<%=mode.hasCheck()%>"
668                  ><input 
669                      type="checkbox" 
670                      name="<%=itemId%>" 
671                      value="<%=itemId%>" 
672                      title="TODO" 
673                      <%=request.getParameter(Integer.toString(itemId)) == null ? "" : "checked"%> 
674                    ></tbl:header>
675                <tbl:header 
676                  clazz="check" 
677                  visible="<%=mode.hasRadio()%>"
678                  ><input 
679                      type="radio" 
680                      name="item_id" 
681                      value="<%=itemId%>" 
682                      title="TODO" 
683                      <%=selectedItemId == itemId ? "checked" : ""%>
684                    ></tbl:header>
685                <tbl:header 
686                  clazz="icons" 
687                  visible="<%=mode.hasIcons()%>"
688                  ></tbl:header>
689                <tbl:cell column="position"><div class="link" onclick="itemOnClick(event, <%=itemId%>)" 
690                  title="<%=tooltip%>"><%=item.getPosition()%></div></tbl:cell>
691                <tbl:cell column="id"><%=item.getId()%></tbl:cell>
692                <tbl:cell column="block"><%=item.getBlock()%></tbl:cell>
693                <tbl:cell column="row"><%=item.getRow()%></tbl:cell>
694                <tbl:cell column="column"><%=item.getColumn()%></tbl:cell>
695                <tbl:cell column="metaGridX"><%=item.getMetaGridX()%></tbl:cell>
696                <tbl:cell column="metaGridY"><%=item.getMetaGridY()%></tbl:cell>
697                <tbl:cell column="x"><%=item.getX()%></tbl:cell>
698                <tbl:cell column="y"><%=item.getY()%></tbl:cell>
699                <tbl:cell column="spotImage">
700                  <%
701                  if (hasSpotImages)
702                  {
703                    %>
704                    <img src="spotimage/<%=ID%>/<%=rawBioAssay.getId()%>/<%=itemId%>/spot<%=item.getPosition()%>.png">
705                    <%
706                  }
707                  %>
708                </tbl:cell>
709                <%
710                for (RawDataProperty rdp : rawBioAssay.getRawDataType().getProperties())
711                {
712                  %>
713                  <tbl:cell column="<%="raw."+rdp.getName()%>"><tbl:cellvalue value="<%=item.getExtended(rdp.getName())%>" /></tbl:cell>
714                  <%
715                }
716                %>
717                <%
718                ReporterData reporter = item.getReporter();
719                if (reporter == null)
720                {
721                  %>
722                  <tbl:cell column="reporter.name"><i>- none -</i></tbl:cell>
723                  <tbl:cell column="reporter.externalId"><i>- none -</i></tbl:cell>
724                  <%
725                }
726                else
727                {
728                  %>
729                  <tbl:cell column="reporter.name"><%=Base.getLink(ID, reporter.getName(), Item.REPORTER, reporter.getId(), writeReporterPermission)%></tbl:cell>
730                  <tbl:cell column="reporter.externalId"><%=HTML.encodeTags(reporter.getExternalId())%></tbl:cell>
731                  <tbl:cell column="reporter.symbol"><%=HTML.encodeTags(reporter.getSymbol())%></tbl:cell>
732                  <tbl:cell column="reporter.description"><%=HTML.encodeTags(reporter.getDescription())%></tbl:cell>
733                  <tbl:cell column="reporter.lastUpdate" value="<%=reporter.getLastUpdate()%>" />
734                  <tbl:cell column="reporter.reporterType"><base:propertyvalue dbcontrol="<%=dc%>" item="<%=reporter%>" property="reporterType.name" /></tbl:cell>
735                  <%
736                  if (reporterProperties != null)
737                  {
738                    for (ExtendedProperty ep : reporterProperties)
739                    {
740                      String name = ep.getName();
741                      %>
742                      <tbl:cell column="<%="reporter."+name%>"><tbl:cellvalue value="<%=reporter.getExtended(name)%>" /></tbl:cell>
743                      <%
744                    }
745                  }
746                }
747                %>
748                <%
749                FeatureData feature = item.getFeature();
750                if (feature == null)
751                {
752                  %>
753                  <tbl:cell column="feature.position"><i>- none -</i></tbl:cell>
754                  <tbl:cell column="feature.externalId"><i>- none -</i></tbl:cell>
755                  <tbl:cell column="feature.row"><i>- none -</i></tbl:cell>
756                  <tbl:cell column="feature.column"><i>- none -</i></tbl:cell>
757                  <tbl:cell column="feature.block"><i>- none -</i></tbl:cell>
758                  <tbl:cell column="feature.metaGridX"><i>- none -</i></tbl:cell>
759                  <tbl:cell column="feature.metaGridY"><i>- none -</i></tbl:cell>
760                  <tbl:cell column="feature.blockSizeX"><i>- none -</i></tbl:cell>
761                  <tbl:cell column="feature.blockSizeY"><i>- none -</i></tbl:cell>
762                  <tbl:cell column="feature.originX"><i>- none -</i></tbl:cell>
763                  <tbl:cell column="feature.originY"><i>- none -</i></tbl:cell>
764                  <tbl:cell column="feature.spacingX"><i>- none -</i></tbl:cell>
765                  <tbl:cell column="feature.spacingY"><i>- none -</i></tbl:cell>
766                  <%
767                }
768                else
769                {
770                  %>
771                  <tbl:cell column="feature.position"><%=feature.getPosition()%></tbl:cell>
772                  <tbl:cell column="feature.externalId"><%=HTML.encodeTags(feature.getExternalId())%></tbl:cell>
773                  <tbl:cell column="feature.row"><%=feature.getRow()%></tbl:cell>
774                  <tbl:cell column="feature.column"><%=feature.getColumn()%></tbl:cell>
775                  <%
776                  ArrayDesignBlock block = null;
777                  try
778                  {
779                    block = Feature.getArrayDesignBlock(dc, feature);
780                  }
781                  catch (PermissionDeniedException ex)
782                  {}
783                  if (block == null)
784                  {
785                    %>
786                    <tbl:cell column="feature.block"><i>- denied -</i></tbl:cell>
787                    <tbl:cell column="feature.metaGridX"><i>- denied -</i></tbl:cell>
788                    <tbl:cell column="feature.metaGridY"><i>- denied -</i></tbl:cell>
789                    <tbl:cell column="feature.blockSizeX"><i>- denied -</i></tbl:cell>
790                    <tbl:cell column="feature.blockSizeY"><i>- denied -</i></tbl:cell>
791                    <tbl:cell column="feature.originX"><i>- denied -</i></tbl:cell>
792                    <tbl:cell column="feature.originY"><i>- denied -</i></tbl:cell>
793                    <tbl:cell column="feature.spacingX"><i>- denied -</i></tbl:cell>
794                    <tbl:cell column="feature.spacingY"><i>- denied -</i></tbl:cell>
795                    <%
796                  }
797                  else
798                  {
799                    %>
800                    <tbl:cell column="feature.block"><%=block.getBlockNumber()%></tbl:cell>
801                    <tbl:cell column="feature.metaGridX"><%=block.getMetaGridX()%></tbl:cell>
802                    <tbl:cell column="feature.metaGridY"><%=block.getMetaGridY()%></tbl:cell>
803                    <tbl:cell column="feature.blockSizeX"><%=block.getBlockSizeX()%></tbl:cell>
804                    <tbl:cell column="feature.blockSizeY"><%=block.getBlockSizeY()%></tbl:cell>
805                    <tbl:cell column="feature.originX"><%=block.getOriginX()%></tbl:cell>
806                    <tbl:cell column="feature.originY"><%=block.getOriginY()%></tbl:cell>
807                    <tbl:cell column="feature.spacingX"><%=block.getSpacingX()%></tbl:cell>
808                    <tbl:cell column="feature.spacingY"><%=block.getSpacingY()%></tbl:cell>
809                    <%
810                  }
811                  Well well = null;
812                  boolean readWell = true;
813                  try
814                  {
815                    well = Feature.getWell(dc, feature);
816                  }
817                  catch (PermissionDeniedException ex)
818                  {
819                    readWell = false;
820                  }
821                  if (!readWell)
822                  {
823                    %>
824                    <tbl:cell column="well.row"><i>- denied -</i></tbl:cell>
825                    <tbl:cell column="well.column"><i>- denied -</i></tbl:cell>
826                    <tbl:cell column="well.plate"><i>- denied -</i></tbl:cell>
827                    <%
828                  }
829                  else if (well == null)
830                  {
831                    %>
832                    <tbl:cell column="well.row"><i>- none -</i></tbl:cell>
833                    <tbl:cell column="well.column"><i>- none -</i></tbl:cell>
834                    <tbl:cell column="well.plate"><i>- none -</i></tbl:cell>
835                    <%
836                  }
837                  else
838                  {
839                    %>
840                    <tbl:cell column="well.row"><%=well.getRow()%></tbl:cell>
841                    <tbl:cell column="well.column"><%=well.getColumn()%></tbl:cell>
842                    <tbl:cell column="well.plate"><%=well.getPlate().getName()%></tbl:cell>
843                    <%
844                  }
845                }
846                %>
847              </tbl:row>
848              <%
849            }
850          }
851          %>
852          </tbl:rows>
853        </tbl:data>
854      <%
855      if (numListed == 0)
856      {
857        %>
858        <tbl:panel><%=rawData == null || rawData.getTotalCount() == 0 ? "No raw data were found" : "No raw data on this page. Please select another page!" %></tbl:panel>
859        <%
860      }
861      else
862      {
863        %>
864        <tbl:navigator
865          page="<%=cc.getPage()%>" 
866          rowsperpage="<%=cc.getRowsPerPage()%>" 
867          totalrows="<%=rawData == null ? 0 : rawData.getTotalCount()%>" 
868          visible="<%=mode.hasNavigator()%>"
869          locked="true"
870        />
871        <%
872      }
873      %>
874    </tbl:table>
875    <base:buttongroup align="center">
876      <base:button onclick="returnSelected();" title="Ok" visible="<%=mode.hasOkButton()%>" />
877      <base:button onclick="window.close();" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
878      <base:button onclick="window.close();" title="Close" visible="<%=mode.hasCloseButton()%>" />
879    </base:buttongroup>
880   
881    </t:tab>
882    </t:tabcontrol>
883  </base:body>
884  </base:page>
885  <%
886}
887finally
888{
889  if (rawData != null) rawData.close();
890  if (dc != null) dc.close();
891}
892%>
Note: See TracBrowser for help on using the repository browser.