Changeset 4866
- Timestamp:
- Mar 31, 2009, 9:36:06 AM (13 years ago)
- Location:
- trunk/www
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/lims/arraydesigns/features/index.jsp
r4511 r4866 40 40 import="net.sf.basedb.clients.web.util.HTML" 41 41 import="net.sf.basedb.util.Values" 42 import="net.sf.basedb.util.formatter.WellCoordinateFormatter" 42 43 import="java.util.List" 43 44 %> … … 48 49 "position,externalId,block,row,column,reporter.name,reporter.externalId"); 49 50 private static final Item itemType = Item.FEATURE; 51 52 private static void registerExportFormatters(ItemContext cc) 53 { 54 cc.setObject("export.formatter.well.row", new WellCoordinateFormatter(true)); 55 cc.setObject("export.formatter.well.column", new WellCoordinateFormatter(false)); 56 } 50 57 %> 51 58 <% … … 99 106 final DataQuery<FeatureData> query = arrayDesign.getFeatures(); 100 107 cc.configureQuery(query, true); 108 registerExportFormatters(cc); 101 109 cc.setQuery(query); 102 110 redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+features+of+array+design"; -
trunk/www/lims/arraydesigns/features/list_features.jsp
r4860 r4866 39 39 import="net.sf.basedb.core.Well" 40 40 import="net.sf.basedb.core.ItemQuery" 41 import="net.sf.basedb.core.ItemResultIterator" 41 42 import="net.sf.basedb.core.DataQuery" 42 43 import="net.sf.basedb.core.DataResultIterator" … … 45 46 import="net.sf.basedb.core.PluginDefinition" 46 47 import="net.sf.basedb.core.PermissionDeniedException" 48 import="net.sf.basedb.core.PlateGeometry" 47 49 import="net.sf.basedb.core.ExtendedProperty" 48 50 import="net.sf.basedb.core.ExtendedProperties" 51 import="net.sf.basedb.core.query.Aggregations" 49 52 import="net.sf.basedb.core.query.Restrictions" 50 53 import="net.sf.basedb.core.query.Expressions" 51 54 import="net.sf.basedb.core.query.Orders" 52 55 import="net.sf.basedb.core.query.Hql" 56 import="net.sf.basedb.core.query.Selects" 53 57 import="net.sf.basedb.core.plugin.GuiContext" 54 58 import="net.sf.basedb.core.plugin.Plugin" … … 91 95 Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); 92 96 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 93 97 98 WellCoordinateFormatter rowFormatter = new WellCoordinateFormatter(true); 99 WellCoordinateFormatter columnFormatter = new WellCoordinateFormatter(false); 100 94 101 final DataQuery<FeatureData> query = design.getFeatures(); 95 102 … … 100 107 101 108 List<ExtendedProperty> reporterProperties = ExtendedProperties.getProperties("ReporterData"); 109 110 Enumeration<String, String> plateRows = new Enumeration<String, String>(); 111 final ItemQuery<PlateGeometry> geometryQuery = PlateGeometry.getQuery(); 112 geometryQuery.order(Orders.desc(Hql.property("rows"))); 113 ItemResultIterator<PlateGeometry> result = geometryQuery.iterate(dc); 114 int maxRows = result.next().getRows(); 115 for (int row = 0; row < maxRows; row++) 116 { 117 plateRows.add(Integer.toString(row), rowFormatter.format(row)); 118 } 102 119 103 120 try … … 275 292 sortable="true" 276 293 filterable="true" 277 exportable="true" 278 formatter="<%=new WellCoordinateFormatter(true)%>" 294 exportable="true" 279 295 /> 280 296 <tbl:columndef … … 286 302 filterable="true" 287 303 exportable="true" 288 formatter="<%=new WellCoordinateFormatter(false)%>"289 304 /> 290 305 <tbl:columndef … … 466 481 sortable="true" 467 482 filterable="true" 468 exportable="true" 483 enumeration="<%=plateRows%>" 484 exportable="true" 485 formatter="<%=rowFormatter%>" 469 486 /> 470 487 <tbl:columndef … … 476 493 filterable="true" 477 494 exportable="true" 495 formatter="<%=columnFormatter%>" 478 496 /> 479 497 <tbl:columndef … … 612 630 title="<%=tooltip%>"><%=HTML.encodeTags(item.getExternalId())%></div></tbl:cell> 613 631 <tbl:cell column="block"><%=block.getBlockNumber()%></tbl:cell> 614 <tbl:cell column="row" value="<%=item.getRow()%>"/>615 <tbl:cell column="column" value="<%=item.getColumn()%>"/>632 <tbl:cell column="row"><%=item.getRow()%></tbl:cell> 633 <tbl:cell column="column"><%=item.getColumn()%></tbl:cell> 616 634 <tbl:cell column="metaGridX"><%=block.getMetaGridX()%></tbl:cell> 617 635 <tbl:cell column="metaGridY"><%=block.getMetaGridY()%></tbl:cell> … … 707 725 { 708 726 %> 709 <tbl:cell column="well.row">< %=well.getRow()%></tbl:cell>710 <tbl:cell column="well.column">< %=well.getColumn()%></tbl:cell>727 <tbl:cell column="well.row"><tbl:cellvalue value="<%=well.getRow()%>"/></tbl:cell> 728 <tbl:cell column="well.column"><tbl:cellvalue value="<%=well.getColumn()%>"/></tbl:cell> 711 729 <tbl:cell column="well.plate"><%=Base.getLinkedName(ID, well.getPlate(), false, true)%></tbl:cell> 712 730 <% -
trunk/www/lims/arraydesigns/features/view_feature.jsp
r4860 r4866 137 137 <tr> 138 138 <td class="prompt">Row</td> 139 <td><%= rowFormatter.format(feature.getRow())%></td>139 <td><%=feature.getRow()%></td> 140 140 <td> </td> 141 141 <td class="prompt">Block size X</td> … … 147 147 <tr> 148 148 <td class="prompt">Column</td> 149 <td><%= columnFormatter.format(feature.getColumn())%></td>149 <td><%=feature.getColumn()%></td> 150 150 <td> </td> 151 151 <td class="prompt">Origin X</td> … … 199 199 Plate plate = well.getPlate(); 200 200 %> 201 <table class="form" cellspacing=0> 201 202 <tr> 202 203 <td class="prompt">Plate</td> … … 205 206 <tr> 206 207 <td class="prompt">Row</td> 207 <td><%= well.getRow()%></td>208 <td><%=rowFormatter.format(well.getRow())%></td> 208 209 </tr> 209 210 <tr> 210 211 <td class="prompt">Column</td> 211 <td><%= well.getColumn()%></td>212 <td><%=columnFormatter.format(well.getColumn())%></td> 212 213 </tr> 214 </table> 213 215 <% 214 216 } -
trunk/www/lims/plates/wells/index.jsp
r4511 r4866 35 35 import="net.sf.basedb.core.PermissionDeniedException" 36 36 import="net.sf.basedb.core.data.ReporterData" 37 import="net.sf.basedb.core.query.Hql" 38 import="net.sf.basedb.core.query.Orders" 37 39 import="net.sf.basedb.util.RemovableUtil" 38 40 import="net.sf.basedb.clients.web.Base" … … 40 42 import="net.sf.basedb.clients.web.util.HTML" 41 43 import="net.sf.basedb.util.Values" 44 import="net.sf.basedb.util.formatter.WellCoordinateFormatter" 42 45 import="java.util.List" 43 46 import="java.util.Collections" … … 48 51 private static final ItemContext defaultContext = Base.createDefaultContext("row", "row,column,reporter.name,reporter.externalId"); 49 52 private static final Item itemType = Item.WELL; 53 54 private static void registerExportFormatters(ItemContext cc) 55 { 56 cc.setObject("export.formatter.row", new WellCoordinateFormatter(true)); 57 cc.setObject("export.formatter.column", new WellCoordinateFormatter(false)); 58 } 50 59 %> 51 60 <% … … 129 138 final ItemQuery<Well> query = plate.getWells(); 130 139 cc.configureQuery(query, true); 131 cc.setQuery(query); 132 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+wells"; 140 if (!"row".equals(cc.getSortProperty())) 141 { 142 query.order(Orders.asc(Hql.property("row"))); 143 } 144 if (!"column".equals(cc.getSortProperty())) 145 { 146 query.order(Orders.asc(Hql.property("column"))); 147 } 148 registerExportFormatters(cc); 149 150 cc.setQuery(query); 151 redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+wells"; 133 152 } 134 153 else if ("ExportItem".equals(cmd)) … … 136 155 // Run an export plugin in single-item context 137 156 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 157 registerExportFormatters(cc); 138 158 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Export+well"; 139 159 } -
trunk/www/lims/plates/wells/list_wells.jsp
r4860 r4866 60 60 import="net.sf.basedb.util.formatter.WellCoordinateFormatter" 61 61 import="net.sf.basedb.clients.web.formatter.FormatterFactory" 62 import="java.util.ArrayList" 62 63 import="java.util.List" 63 64 import="java.util.Map" … … 99 100 Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); 100 101 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 102 103 Enumeration<String,String> rows = new Enumeration<String, String>(); 104 WellCoordinateFormatter rowFormatter = new WellCoordinateFormatter(true); 105 for (int i=0; i<plate.getPlateType().getPlateGeometry().getRows(); i++) 106 { 107 rows.add(Integer.toString(i), rowFormatter.format(i)); 108 } 101 109 102 110 try … … 226 234 filterable="true" 227 235 exportable="true" 236 enumeration="<%=rows%>" 228 237 show="always" 229 238 formatter="<%=new WellCoordinateFormatter(true)%>" … … 521 530 onclick="itemOnClick(<%=writePermission ? "event" : null%>, <%=itemId%>)" 522 531 title="<%=tooltip%>"><tbl:cellvalue value="<%=item.getRow()%>" /></div></tbl:cell> 523 <tbl:cell column="column" value="<%=item.getColumn()%>" />532 <tbl:cell column="column"><tbl:cellvalue value="<%=item.getColumn()%>"/></tbl:cell> 524 533 <tbl:cell column="id"><%=item.getId()%></tbl:cell> 525 534 <tbl:cell column="parent"> -
trunk/www/views/rawbioassays/rawdata/index.jsp
r4511 r4866 42 42 import="net.sf.basedb.clients.web.util.HTML" 43 43 import="net.sf.basedb.util.Values" 44 import="net.sf.basedb.util.formatter.WellCoordinateFormatter" 44 45 import="java.util.List" 45 46 %> … … 49 50 private static final ItemContext defaultContext = Base.createDefaultContext("position", "position,block,row,column,reporter.name,reporter.externalId"); 50 51 private static final Item itemType = Item.RAWDATA; 52 53 private static void registerExportFormatters(ItemContext cc) 54 { 55 cc.setObject("export.formatter.feature.well.row", new WellCoordinateFormatter(true)); 56 cc.setObject("export.formatter.feature.well.column", new WellCoordinateFormatter(false)); 57 } 51 58 %> 52 59 <% … … 104 111 final DataQuery<RawData> query = rba.getRawData(); 105 112 cc.configureQuery(query, true); 113 registerExportFormatters(cc); 106 114 cc.setQuery(query); 107 115 redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&subcontext="+rawDataType.getId()+"&context_type=LIST&title=Export+raw+data"; -
trunk/www/views/rawbioassays/rawdata/list_rawdata.jsp
r4860 r4866 40 40 import="net.sf.basedb.core.DataQuery" 41 41 import="net.sf.basedb.core.DataResultIterator" 42 import="net.sf.basedb.core.ItemResultIterator" 42 43 import="net.sf.basedb.core.ItemResultList" 43 44 import="net.sf.basedb.core.Permission" 45 import="net.sf.basedb.core.PlateGeometry" 44 46 import="net.sf.basedb.core.PluginDefinition" 45 47 import="net.sf.basedb.core.ExtendedProperty" … … 106 108 typeQuery.setCacheResult(true); 107 109 List<ExtendedProperty> reporterProperties = ExtendedProperties.getProperties("ReporterData"); 110 111 WellCoordinateFormatter rowFormatter = new WellCoordinateFormatter(true); 112 WellCoordinateFormatter columnFormatter = new WellCoordinateFormatter(false); 113 114 Enumeration<String, String> plateRows = new Enumeration<String, String>(); 115 final ItemQuery<PlateGeometry> geometryQuery = PlateGeometry.getQuery(); 116 geometryQuery.order(Orders.desc(Hql.property("rows"))); 117 ItemResultIterator<PlateGeometry> result = geometryQuery.iterate(dc); 118 int maxRows = result.next().getRows(); 119 for (int row = 0; row < maxRows; row++) 120 { 121 plateRows.add(Integer.toString(row), rowFormatter.format(row)); 122 } 108 123 109 124 try … … 272 287 sortable="true" 273 288 filterable="true" 274 exportable="true" 275 formatter="<%=new WellCoordinateFormatter(true)%>" 289 exportable="true" 276 290 /> 277 291 <tbl:columndef … … 283 297 filterable="true" 284 298 exportable="true" 285 formatter="<%=new WellCoordinateFormatter(false)%>"286 299 /> 287 300 <tbl:columndef … … 547 560 title="[Well] Row" 548 561 sortable="true" 549 filterable="true" 550 exportable="true" 562 filterable="true" 563 enumeration="<%=plateRows%>" 564 exportable="true" 565 formatter="<%=rowFormatter%>" 551 566 /> 552 567 <tbl:columndef … … 558 573 filterable="true" 559 574 exportable="true" 575 formatter="<%=columnFormatter%>" 560 576 /> 561 577 <tbl:columndef … … 692 708 <tbl:cell column="id"><%=item.getId()%></tbl:cell> 693 709 <tbl:cell column="block"><%=item.getBlock()%></tbl:cell> 694 <tbl:cell column="row" value="<%=item.getRow()%>"/>695 <tbl:cell column="column" value="<%=item.getColumn()%>"/>710 <tbl:cell column="row"><tbl:cellvalue value="<%=item.getRow()%>"/></tbl:cell> 711 <tbl:cell column="column"><tbl:cellvalue value="<%=item.getColumn()%>"/></tbl:cell> 696 712 <tbl:cell column="metaGridX"><%=item.getMetaGridX()%></tbl:cell> 697 713 <tbl:cell column="metaGridY"><%=item.getMetaGridY()%></tbl:cell> … … 839 855 { 840 856 %> 841 <tbl:cell column="well.row">< %=well.getRow()%></tbl:cell>842 <tbl:cell column="well.column">< %=well.getColumn()%></tbl:cell>857 <tbl:cell column="well.row"><tbl:cellvalue value="<%=well.getRow()%>"/></tbl:cell> 858 <tbl:cell column="well.column"><tbl:cellvalue value="<%=well.getColumn()%>"/></tbl:cell> 843 859 <tbl:cell column="well.plate"><%=well.getPlate().getName()%></tbl:cell> 844 860 <% -
trunk/www/views/rawbioassays/rawdata/view_rawdata.jsp
r4860 r4866 121 121 <tr> 122 122 <td class="prompt">Row</td> 123 <td><%=r owFormatter.format(rawData.getRow())%></td>123 <td><%=rawData.getRow()%></td> 124 124 </tr> 125 125 <tr> 126 126 <td class="prompt">Column</td> 127 <td><%= columnFormatter.format(rawData.getColumn())%></td>127 <td><%=rawData.getColumn()%></td> 128 128 </tr> 129 129 <tr> … … 394 394 <tr> 395 395 <td class="prompt">Row</td> 396 <td><%= well.getRow()%></td>396 <td><%=rowFormatter.format(well.getRow())%></td> 397 397 </tr> 398 398 <tr> 399 399 <td class="prompt">Column</td> 400 <td><%= well.getColumn()%></td>400 <td><%=columnFormatter.format(well.getColumn())%></td> 401 401 </tr> 402 402 </table>
Note: See TracChangeset
for help on using the changeset viewer.