Ignore:
Timestamp:
Jan 17, 2011, 1:34:18 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

References #1564: Move biomaterial on plates

Fixes an issue with an incorrect filter when selecting destination plate if used with plates containing extracts or labeled extracts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/biomaterials/wizards/move_biomaterial.jsp

    r5541 r5542  
    2222  @author Nicklas
    2323--%>
    24 <%@page import="net.sf.basedb.core.BioPlateEventType"%>
    2524<%@ page pageEncoding="UTF-8" session="false"
    2625  import="net.sf.basedb.core.BioPlate"
    2726  import="net.sf.basedb.core.BioPlateEvent"
     27  import="net.sf.basedb.core.PermissionDeniedException"
     28  import="net.sf.basedb.core.BioPlateEventType"
    2829  import="net.sf.basedb.core.MeasuredBioMaterial"
    2930  import="net.sf.basedb.core.Hardware"
     
    6364  List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    6465 
    65   Item itemType = Item.SAMPLE;
     66  Item itemType = null;
     67  try
     68  {
     69    itemType = sourcePlate.getBioPlateType().getBioMaterialType();
     70  }
     71  catch (PermissionDeniedException ex)
     72  {}
    6673 
    6774  final String clazz = "class=\"text\"";
     
    350357     
    351358      var url = '../bioplates/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setBioPlateCallback';
    352       url += '&resetTemporary=1&tmpfilter:INT:bioPlateType.bioMaterialType=|<%=itemType.getValue()%>'
     359      url += '&resetTemporary=1&tmpfilter:INT:bioPlateType.bioMaterialType=<%=itemType == null ? "=" : "|" + itemType.getValue()%>'
    353360      url += '&exclude='+sourcePlate.id;
    354361      Main.openPopup(url, 'SelectBioPlate', 1000, 700);
Note: See TracChangeset for help on using the changeset viewer.