Changeset 5989


Ignore:
Timestamp:
Mar 2, 2012, 3:10:02 PM (11 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1661: Can't export 'Raw bioassays' column in the Extracts list page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0-stable/www/biomaterials/extracts/index.jsp

    r5687 r5989  
    3838  import="net.sf.basedb.core.Tag"
    3939  import="net.sf.basedb.core.PhysicalBioAssay"
     40  import="net.sf.basedb.core.RawBioAssay"
    4041  import="net.sf.basedb.core.ItemSubtype"
    4142  import="net.sf.basedb.core.ItemQuery"
     
    9293    cc.setObject("export.formatter.&childCreationEvents(event.physicalBioAssay.name)", new NameableFormatter());
    9394    cc.setObject("export.formatter.&childCreationEvents(event.bioMaterial.name)", new NameableFormatter());
     95    cc.setObject("export.formatter.&rawBioAssays(name)", new NameableFormatter());
    9496    cc.setObject("export.formatter.parentType", new ItemTypeFormatter());
    9597   
     
    122124    parentExtractsQuery.include(cc.getInclude());
    123125    cc.setObject("export.dataloader.&creationEvent.sources(bioMaterial.name)", new ParentBioMaterialLoader(parentExtractsQuery, restrictionParameter));
     126   
     127    // Child raw bioassays
     128    final ItemQuery<RawBioAssay> rawBioAssayQuery = RawBioAssay.getQuery();
     129    rawBioAssayQuery.restrict(Restrictions.eq(Hql.property("parentExtract"), Expressions.parameter(restrictionParameter)));
     130    rawBioAssayQuery.order(Orders.asc(Hql.property("name")));
     131    rawBioAssayQuery.include(cc.getInclude());
     132    cc.setObject("export.dataloader.&rawBioAssays(name)", new ItemQueryLoader(rawBioAssayQuery, restrictionParameter));
    124133  }
    125134%>
Note: See TracChangeset for help on using the changeset viewer.