Changeset 4899


Ignore:
Timestamp:
Apr 21, 2009, 11:32:06 AM (13 years ago)
Author:
Martin Svensson
Message:

References #1128 Tested the dataloaders on extracts' children.

Location:
trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/biomaterials/extracts/index.jsp

    r4896 r4899  
    3636  import="net.sf.basedb.core.ItemQuery"
    3737  import="net.sf.basedb.core.ItemResultIterator"
     38  import="net.sf.basedb.core.LabeledExtract"
    3839  import="net.sf.basedb.core.Permission"
    3940  import="net.sf.basedb.core.ItemContext"
     
    4243  import="net.sf.basedb.core.PermissionDeniedException"
    4344  import="net.sf.basedb.core.ItemAlreadyExistsException"
     45  import="net.sf.basedb.core.query.Hql"
     46  import="net.sf.basedb.core.query.Orders"
     47  import="net.sf.basedb.core.query.Restrictions"
     48  import="net.sf.basedb.core.query.Expressions"
    4449  import="net.sf.basedb.util.RemovableUtil"
    4550  import="net.sf.basedb.util.ShareableUtil"
     
    5055  import="net.sf.basedb.clients.web.util.HTML"
    5156  import="net.sf.basedb.util.formatter.Formatter"
     57  import="net.sf.basedb.util.formatter.NameableFormatter"
    5258  import="net.sf.basedb.util.formatter.WellCoordinateFormatter"
    5359  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
     60  import="net.sf.basedb.clients.web.plugins.ItemQueryLoader"
    5461  import="java.util.Enumeration"
    5562  import="java.util.Set"
     
    6976    cc.setObject("export.formatter.bioWell.row", new WellCoordinateFormatter(true));
    7077    cc.setObject("export.formatter.bioWell.column", new WellCoordinateFormatter(false));
     78    cc.setObject("export.formatter.&children(name)", new NameableFormatter());
     79   
     80    String extractParameter = "extracts";
     81    ItemQuery<LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery();
     82    labeledExtractQuery.include(cc.getInclude());
     83    labeledExtractQuery.restrict(Restrictions.eq(Hql.property("parent"), Expressions.parameter(extractParameter)));
     84    labeledExtractQuery.order(Orders.asc(Hql.property("name")));
     85    cc.setObject("export.dataloader.&children(name)", new ItemQueryLoader(labeledExtractQuery, extractParameter));
    7186  }
    7287%>
  • trunk/www/biomaterials/extracts/list_extracts.jsp

    r4896 r4899  
    364364        datatype="string"
    365365        filterable="true"
     366        exportable="true"
    366367      />
    367368      <tbl:columndef
Note: See TracChangeset for help on using the changeset viewer.