Changeset 4869 for trunk/www/biomaterials/samples/list_samples.jsp
- Timestamp:
- Mar 31, 2009, 2:21:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/biomaterials/samples/list_samples.jsp
r4734 r4869 44 44 import="net.sf.basedb.core.Permission" 45 45 import="net.sf.basedb.core.PermissionDeniedException" 46 import="net.sf.basedb.core.PlateGeometry" 46 47 import="net.sf.basedb.core.PluginDefinition" 47 48 import="net.sf.basedb.core.Annotation" … … 64 65 import="net.sf.basedb.util.Values" 65 66 import="net.sf.basedb.util.formatter.Formatter" 67 import="net.sf.basedb.util.formatter.WellCoordinateFormatter" 66 68 import="net.sf.basedb.clients.web.formatter.FormatterFactory" 67 69 import="java.util.Iterator" … … 112 114 int numListed = 0; 113 115 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 116 WellCoordinateFormatter rowFormatter = new WellCoordinateFormatter(true); 117 WellCoordinateFormatter columnFormatter = new WellCoordinateFormatter(false); 118 119 Enumeration<String, String> wellRows = new Enumeration<String, String>(); 120 ItemQuery<PlateGeometry> geometryQuery = PlateGeometry.getQuery(); 121 geometryQuery.order(Orders.desc(Hql.property("rows"))); 122 ItemResultIterator<PlateGeometry> result = geometryQuery.iterate(dc); 123 int maxRows = result.next().getRows(); 124 for (int r = 0; r < maxRows; r++) 125 { 126 wellRows.add(Integer.toString(r), rowFormatter.format(r)); 127 } 114 128 %> 115 129 <base:page title="<%=title==null ? "Samples" : title%>" type="<%=mode.getPageType()%>"> … … 369 383 title="Biowell row" 370 384 filterable="true" 385 enumeration="<%=wellRows%>" 371 386 exportable="true" 372 387 sortable="true" 388 formatter="<%=rowFormatter%>" 373 389 /> 374 390 <tbl:columndef … … 381 397 exportable="true" 382 398 sortable="true" 399 formatter="<%=columnFormatter%>" 383 400 /> 384 401 <tbl:columndef … … 639 656 enablePropertyLink="<%=mode.hasPropertyLink()%>" 640 657 /></tbl:cell> 641 <tbl:cell column="bioPlate"> 642 <base:propertyvalue 643 item="<%=item%>" 644 property="bioWell.bioPlate" 645 enableEditLink="<%=mode.hasEditLink()%>" 646 enablePropertyLink="<%=mode.hasPropertyLink()%>" 647 /> 648 </tbl:cell> 649 <tbl:cell column="bioWellRow"> 650 <base:propertyvalue 651 item="<%=item%>" 652 property="bioWell.row" 653 enableEditLink="<%=mode.hasEditLink()%>" 654 enablePropertyLink="<%=mode.hasPropertyLink()%>" 655 /> 656 </tbl:cell> 657 <tbl:cell column="bioWellColumn"> 658 <base:propertyvalue 659 item="<%=item%>" 660 property="bioWell.column" 661 enableEditLink="<%=mode.hasEditLink()%>" 662 enablePropertyLink="<%=mode.hasPropertyLink()%>" 663 /> 664 </tbl:cell> 658 <% 659 BioWell well = null; 660 boolean readBioWell = true; 661 try 662 { 663 well = item.getBioWell(); 664 } 665 catch(PermissionDeniedException e) 666 { 667 readBioWell = false; 668 } 669 if (!readBioWell) 670 { 671 %> 672 <tbl:cell column="bioWellRow"><i>- denied -</i> </tbl:cell> 673 <tbl:cell column="bioWellColumn"><i>- denied -</i> </tbl:cell> 674 <tbl:cell column="bioPlate"><i>- denied -</i> </tbl:cell> 675 <% 676 } 677 else if (well == null) 678 { 679 %> 680 <tbl:cell column="bioWellRow"><i>- none -</i> </tbl:cell> 681 <tbl:cell column="bioWellColumn"><i>- none -</i> </tbl:cell> 682 <tbl:cell column="bioPlate"><i>- none -</i> </tbl:cell> 683 <% 684 685 } 686 else 687 { 688 %> 689 <tbl:cell column="bioWellRow"> 690 <tbl:cellvalue value="<%=well.getRow()%>"/> 691 </tbl:cell> 692 <tbl:cell column="bioWellColumn"> 693 <tbl:cellvalue value="<%=well.getColumn()%>"/> 694 </tbl:cell> 695 <tbl:cell column="bioPlate"><%=Base.getLinkedName(ID, well.getPlate(), false, true)%></tbl:cell> 696 <% 697 } 698 %> 665 699 <tbl:cell column="eventDate" value="<%=creationEvent.getEventDate()%>" /> 666 700 <tbl:cell column="entryDate" value="<%=creationEvent.getEntryDate()%>" />
Note: See TracChangeset
for help on using the changeset viewer.