Changeset 7903


Ignore:
Timestamp:
Jan 25, 2021, 11:52:46 AM (11 months ago)
Author:
Nicklas Nordborg
Message:

Refereces #2237: Implement extension mechanism for query filtering

The RawBioassays table is now using a single JspContext instance for all extensions which makes it possible for a query filter extension to pass information to a column extension via context variables.

Location:
trunk/www/views/rawbioassays
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/views/rawbioassays/index.jsp

    r7813 r7903  
    514514    final ItemQuery<RawBioAssay> query = RawBioAssay.getQuery();
    515515    dc = sc.newDbControl();
     516    JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.list(itemType), null);
    516517    cc.setQuery(query);
    517     cc.configureQuery(dc, query, true);
     518    cc.configureQuery(dc, query, jspContext, true);
    518519    registerExportUtils(cc);
    519     JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.list(itemType), null);
    520520    ExtensionsInvoker<ListColumnAction<RawBioAssay,?>> listInvoker = ListColumnUtil.useExtensions(jspContext);
    521521    listInvoker.render(new ListColumnExportRenderer<RawBioAssay>(cc));
     
    536536    final ItemQuery<RawBioAssay> query = RawBioAssay.getQuery();
    537537    dc = sc.newDbControl();
    538     cc.configureQuery(dc, query, true);
     538    JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.list(itemType), null);
     539    cc.configureQuery(dc, query, jspContext, true);
    539540    dc.close();
    540541    cc.setQuery(query);
     
    553554    final ItemQuery<RawBioAssay> query = RawBioAssay.getQuery();
    554555    dc = sc.newDbControl();
    555     cc.configureQuery(dc, query, true);
     556    JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.list(itemType), null);
     557    cc.configureQuery(dc, query, jspContext, true);
    556558    dc.close();
    557559    cc.setQuery(query);
  • trunk/www/views/rawbioassays/list_rawbioassays.jsp

    r7855 r7903  
    165165  Unit bytes = UnitUtil.getUnit(dc, Quantity.STORAGE_SIZE, "B");
    166166  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
     167  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
    167168  try
    168169  {
    169     final ItemQuery<RawBioAssay> query = Base.getConfiguredQuery(dc, cc, true, RawBioAssay.getQuery(), mode);
     170    final ItemQuery<RawBioAssay> query = Base.getConfiguredQuery(dc, cc, jspContext, true, RawBioAssay.getQuery(), mode);
    170171    rawBioAssays = query.iterate(dc);
    171172  }
     
    178179  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    179180  int numListed = 0;
    180   JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
    181181  ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext);
    182182  ExtensionsInvoker<ListColumnAction<RawBioAssay,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext);
Note: See TracChangeset for help on using the changeset viewer.