Changeset 4896


Ignore:
Timestamp:
Apr 20, 2009, 1:08:37 PM (13 years ago)
Author:
Martin Svensson
Message:

References #1128 Undoing changeset [4895]

Location:
trunk
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/ExportedProperty.java

    r4895 r4896  
    4141  public final Unit unit;
    4242  public final Formatter formatter;
    43   public final boolean isComplex;
    4443 
    4544  public static ExportedProperty parse(DbControl dc, String column, boolean annotatable, Formatter formatter)
     
    8281    if (columnPrefix != null) title = columnPrefix + title;
    8382    if (columnSuffix != null) title += columnSuffix;
    84     return new ExportedProperty(name, title, at, unit, formatter, name.startsWith("&"));
     83    return new ExportedProperty(name, title, at, unit, formatter);
    8584  }
    8685
     
    9695    AnnotationType annotationType, Unit unit, Formatter formatter)
    9796  {
    98     this(name, title, annotationType, unit, formatter, false);
    99   }
    100  
    101   /**
    102     @since 2.12
    103    */
    104   public ExportedProperty(String name, String title,
    105       AnnotationType annotationType, Unit unit, Formatter formatter, boolean isComplex)
    106   {
    10797    this.name = name;
    10898    this.title = title;
     
    110100    this.formatter = formatter;
    111101    this.unit = unit;
    112     this.isComplex = isComplex;
    113102  }
     103 
    114104}
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/SimpleExport.java

    r4895 r4896  
    569569            else
    570570            {
    571               Object data = ep.isComplex ? item : queryWrapper.getData(ep, item);
     571              Object data = queryWrapper.getData(ep, item);
    572572              template.writeProperty(ep, data);
    573573            }
  • trunk/www/biomaterials/extracts/index.jsp

    r4895 r4896  
    3333  import="net.sf.basedb.core.BioMaterialEvent"
    3434  import="net.sf.basedb.core.BioWell"
    35   import="net.sf.basedb.core.LabeledExtract"
    3635  import="net.sf.basedb.core.Protocol"
    3736  import="net.sf.basedb.core.ItemQuery"
     
    5049  import="net.sf.basedb.util.Values"
    5150  import="net.sf.basedb.clients.web.util.HTML"
    52   import="net.sf.basedb.util.formatter.ParentPropertyFormatter"
    53   import="net.sf.basedb.util.formatter.PropertyFormatter"
    5451  import="net.sf.basedb.util.formatter.Formatter"
    5552  import="net.sf.basedb.util.formatter.WellCoordinateFormatter"
     
    7269    cc.setObject("export.formatter.bioWell.row", new WellCoordinateFormatter(true));
    7370    cc.setObject("export.formatter.bioWell.column", new WellCoordinateFormatter(false));
    74     cc.setObject("export.formatter.&children(name)", new PropertyFormatter("getLabeledExtracts"));
    75     cc.setObject("export.formatter.&creationEvent.sourceBioMaterials(name)", new ParentPropertyFormatter("getCreationEvent.getSources", "getSample"));
    7671  }
    7772%>
     
    330325  {
    331326    // Run an export plugin in a list context
    332     dc = sc.newDbControl();
    333327    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    334328    final ItemQuery<Extract> query = Extract.getQuery();
    335329    cc.configureQuery(query, true);
    336330    registerExportFormatters(cc);
    337     dc.close();
    338331    cc.setQuery(query);
    339     redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+extracts";   
     332    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+extracts";
    340333  }
    341334  else if ("ExportItem".equals(cmd))
    342335  {
    343336    // Run an export plugin in single-item context
    344     dc = sc.newDbControl();
    345337    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    346338    registerExportFormatters(cc);
    347     dc.close();
    348339    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Export+extract";
    349340  }
  • trunk/www/biomaterials/extracts/list_extracts.jsp

    r4895 r4896  
    357357        datatype="string"
    358358        filterable="true"
    359         exportable="true"
    360359      />
    361360      <tbl:columndef
     
    365364        datatype="string"
    366365        filterable="true"
    367         exportable="true"
    368366      />
    369367      <tbl:columndef
Note: See TracChangeset for help on using the changeset viewer.