Changeset 4887


Ignore:
Timestamp:
Apr 6, 2009, 9:58:20 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1271: Add extension points to all toolbars

All toolbars should now have an extension point.

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarUtil.java

    r4886 r4887  
    7575      Item.PLUGINDEFINITION, Item.PLUGINTYPE, Item.PLUGINCONFIGURATION, Item.JOBAGENT,
    7676      Item.MIMETYPE, Item.REPORTERTYPE, Item.EXTRAVALUETYPE,
    77       Item.ANNOTATIONTYPE, Item.ANNOTATIONTYPECATEGORY, Item.QUANTITY, Item.UNIT
     77      Item.ANNOTATIONTYPE, Item.ANNOTATIONTYPECATEGORY, Item.QUANTITY, Item.UNIT,
     78      Item.SESSION, Item.JOB, Item.MESSAGE, Item.PROJECT, Item.FILE
    7879    };
    7980
     
    182183    register(registry, EP_ANNOTATABLE[LIST], "Toolbar: list pages for annotatable items");
    183184    register(registry, EP_ANNOTATABLE[ITEM], "Toolbar: single-item pages for annotatable items");
     185   
     186    // Special toolbars
     187    register(registry, EP_PREFIX[LIST] + "trashcan", "Toolbar: trashcan list");
     188    register(registry, EP_PREFIX[ITEM] + "trashcan", "Toolbar: trashcan detail");
     189    register(registry, EP_PREFIX[LIST] + "allitems", "Toolbar: all items");
     190    register(registry, EP_PREFIX[LIST] + "projectitems", "Toolbar: project items");
     191    register(registry, EP_PREFIX[ITEM] + "overview", "Toolbar: item overview");
     192    register(registry, EP_PREFIX[LIST] + "diskusage", "Toolbar: disk usage");
    184193   
    185194    for (Item item : TOOLBAR_ITEMS)
  • trunk/www/admin/diskusage/details/view_details.jsp

    r4701 r4887  
    6161  import="net.sf.basedb.clients.web.util.HTML"
    6262  import="net.sf.basedb.util.Values"
     63  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     64  import="net.sf.basedb.clients.web.extensions.JspContext"
     65  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     66  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     67  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    6368  import="java.util.Map"
    6469  import="java.util.List"
     
    6873<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
    6974<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
     75<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    7076<%!
    7177  private static final String subContext = "diskUsage";
     
    141147    cc.setMessage(t.getMessage());
    142148  }
     149  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext,
     150      GuiContext.list(Item.DISKUSAGE), user == null ? group : user);
     151  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    143152  %>
    144153  <base:page >
    145154  <base:head scripts="table.js,tabcontrol.js" styles="toolbar.css,table.css,headertabcontrol.css,path.css">
     155    <ext:scripts context="<%=jspContext%>" />
     156    <ext:stylesheets context="<%=jspContext%>" />
    146157    <script language="JavaScript">
    147158    var formId = 'items';
     
    209220        tooltip="<%=writePermission ? "Edit this item" : "You do not have permission to edit this item"%>"
    210221      />
     222      <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     223        wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    211224      <tbl:button
    212225        image="help.gif"
  • trunk/www/admin/diskusage/list_groups.jsp

    r4510 r4887  
    5555  import="net.sf.basedb.clients.web.util.HTML"
    5656  import="net.sf.basedb.util.Values"
     57  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     58  import="net.sf.basedb.clients.web.extensions.JspContext"
     59  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     60  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     61  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5762  import="java.util.List"
    5863  import="java.util.Map"
     
    6166<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
    6267<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
     68<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    6369<%!
    6470  private static final Item itemType = Item.DISKUSAGE;
    6571  private static final String subContext = "perGroup";
     72  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST, subContext);
    6673%>
    6774<%
     
    104111  }
    105112  int numListed = 0;
     113  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
     114  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    106115  %>
    107116  <base:page title="Disk usage">
    108117  <base:head scripts="table.js,tabcontrol.js" styles="table.css,headertabcontrol.css">
     118    <ext:scripts context="<%=jspContext%>" />
     119    <ext:stylesheets context="<%=jspContext%>" />
    109120    <script language="JavaScript">
    110121    var submitPage = 'index.jsp';
     
    232243          tooltip="Show, hide and re-order columns"
    233244        />
     245        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     246          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    234247      </tbl:toolbar>
    235248      <tbl:panel>
  • trunk/www/admin/diskusage/list_users.jsp

    r4510 r4887  
    5757  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
    5858  import="net.sf.basedb.util.Values"
     59  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     60  import="net.sf.basedb.clients.web.extensions.JspContext"
     61  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     62  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     63  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5964  import="java.util.List"
    6065  import="java.util.Map"
     
    6368<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
    6469<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
     70<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    6571<%!
    6672  private static final Item itemType = Item.DISKUSAGE;
    6773  private static final String subContext = "perUser";
     74  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST, subContext);
    6875%>
    6976<%
     
    104111  }
    105112  int numListed = 0;
     113  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
     114  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    106115  %>
    107116  <base:page title="Disk usage">
    108117  <base:head scripts="table.js,tabcontrol.js" styles="table.css,headertabcontrol.css">
     118    <ext:scripts context="<%=jspContext%>" />
     119    <ext:stylesheets context="<%=jspContext%>" />
    109120    <script language="JavaScript">
    110121    var submitPage = 'index.jsp';
     
    364375          tooltip="Show, hide and re-order columns"
    365376        />
     377        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     378          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    366379      </tbl:toolbar>
    367380      <tbl:panel>
  • trunk/www/admin/extensions/tree.jsp

    r4870 r4887  
    116116
    117117    var byExtPoint = JoustMenu.addMenuItem(-1, 'Root', 'By extension point', 'rootOnClick()', '', '');
     118    var toolbars = JoustMenu.addChildItem(byExtPoint, 'Folder', 'Toolbars');
    118119    var ep;
    119120    var ext;
     
    124125    {
    125126      ExtensionPoint ep = extensionPoints.next();
     127      String parent = ep.getId().startsWith("net.sf.basedb.clients.web.toolbar") ?
     128          "toolbars" : "byExtPoint";
    126129      %>
    127       <%=getJoustExtensionPoint("byExtPoint", ec, ep)%>
     130      <%=getJoustExtensionPoint(parent, ec, ep)%>
    128131      <%
    129132      Iterator<Extension<?>> extensions = ec.getExtensions(ep.getId());
  • trunk/www/common/overview/overview.jsp

    r4840 r4887  
    3434  import="net.sf.basedb.util.overview.GenericOverview"
    3535  import="net.sf.basedb.util.overview.OverviewUtil"
     36  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     37  import="net.sf.basedb.clients.web.extensions.JspContext"
     38  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     39  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     40  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    3641%>
    3742<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
     
    3944<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
    4045<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     46<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    4147<%
    4248final Item itemType = Item.valueOf(request.getParameter("item_type"));
     
    4450final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
    4551final String ID = sc.getId();
    46 final DbControl dc = null;
    4752final String root = request.getContextPath();
     53final DbControl dc = sc.newDbControl();
    4854try
    4955{
     56  BasicItem item = itemType.getById(dc, itemId);
     57  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, item);
     58  ExtensionsInvoker invoker = ExtensionsControl.useExtensions(jspContext,
     59    "net.sf.basedb.clients.web.toolbar.item.overview");
    5060  %>
    5161  <base:page type="include">
    5262  <base:body>
     63    <ext:scripts context="<%=jspContext%>" />
     64    <ext:stylesheets context="<%=jspContext%>" />
    5365    <script language="JavaScript">
    5466    var timer = 0;
     
    123135        <tbl:button image="configure.png" title="Validation options&hellip;"
    124136          onclick="validationOptions()" tooltip="Change validation options" />
     137        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     138          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    125139        <tbl:button image="help.gif" title="Help&hellip;"
    126140          onclick="<%="Main.openHelp('" + ID +"', 'item.overview')"%>"
  • trunk/www/filemanager/files/list_files.jsp

    r4865 r4887  
    6363  import="net.sf.basedb.util.Values"
    6464  import="net.sf.basedb.util.formatter.Formatter"
     65  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     66  import="net.sf.basedb.clients.web.extensions.JspContext"
     67  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     68  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     69  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    6570  import="java.util.Iterator"
    6671  import="java.util.Map"
     
    7075<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
    7176<%@ taglib prefix="m" uri="/WEB-INF/menu.tld" %>
     77<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    7278<%!
    7379  private static final Item itemType = Item.FILE;
     
    154160  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
    155161  int numDecimals = FormatterSettings.getNumDecimals(sc);
     162  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, current);
     163  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    156164  %>
    157165  <base:page title="<%=title==null ? "Files" : title%>" type="popup">
    158166  <base:head scripts="table.js,menu.js" styles="table.css,menu.css">
     167    <ext:scripts context="<%=jspContext%>" />
     168    <ext:stylesheets context="<%=jspContext%>" />
    159169    <script language="JavaScript">
    160170    var submitPage = 'index.jsp';
     
    640650          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    641651        />
     652        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     653          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    642654      </tbl:toolbar>
    643655      <tbl:panel>
  • trunk/www/filemanager/files/view_file.jsp

    r4867 r4887  
    4949  import="net.sf.basedb.util.Values"
    5050  import="net.sf.basedb.util.formatter.Formatter"
     51  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     52  import="net.sf.basedb.clients.web.extensions.JspContext"
     53  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     54  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     55  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5156  import="java.util.Collections"
    5257  import="java.util.Date"
     
    5762<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
    5863<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     64<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    5965<%!
    6066  private static final Item itemType = Item.FILE;
     
    9298
    9399  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
     100  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, file);
     101  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    94102  %>
    95103  <base:page type="popup" title="<%=title%>">
    96104  <base:head scripts="table.js" styles="table.css,toolbar.css">
     105    <ext:scripts context="<%=jspContext%>" />
     106    <ext:stylesheets context="<%=jspContext%>" />
    97107    <script language="JavaScript">
    98108    function editItem()
     
    244254        visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    245255      />
     256      <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     257        wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    246258      <tbl:button
    247259        image="help.gif"
  • trunk/www/my_base/messages/list_messages.jsp

    r4511 r4887  
    5151  import="net.sf.basedb.util.formatter.Formatter"
    5252  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
     53  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     54  import="net.sf.basedb.clients.web.extensions.JspContext"
     55  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     56  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     57  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5358  import="java.util.List"
    5459  import="java.util.Map"
     
    5762<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    5863<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     64<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    5965<%!
    6066  private static final Item itemType = Item.MESSAGE;
     
    8894  int numListed = 0;
    8995  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
     96  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
     97  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    9098  %>
    9199  <base:page title="<%=title==null ? "Messages" : title%>" type="<%=mode.getPageType()%>">
    92100  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
     101    <ext:scripts context="<%=jspContext%>" />
     102    <ext:stylesheets context="<%=jspContext%>" />
    93103    <script language="JavaScript">
    94104    var submitPage = 'index.jsp';
     
    301311          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    302312        />
     313        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     314          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    303315      </tbl:toolbar>
    304316      <tbl:navigator
  • trunk/www/my_base/projects/items/list_items.jsp

    r4587 r4887  
    4848  import="net.sf.basedb.clients.web.util.HTML"
    4949  import="net.sf.basedb.util.Values"
     50  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     51  import="net.sf.basedb.clients.web.extensions.JspContext"
     52  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     53  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     54  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5055  import="java.util.Set"
    5156  import="java.util.HashSet"
     
    5661<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
    5762<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
     63<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    5864<%!
    5965  private static final Item itemType = Item.PROJECT;
     
    102108  }
    103109  int numListed = 0;
     110  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, project);
     111  ExtensionsInvoker invoker = ExtensionsControl.useExtensions(jspContext, 
     112      "net.sf.basedb.clients.web.toolbar.list.all",
     113      "net.sf.basedb.clients.web.toolbar.list.projectitems");
    104114  %>
    105115  <base:page>
    106116  <base:head scripts="table.js,tabcontrol.js" styles="table.css,headertabcontrol.css,path.css">
     117    <ext:scripts context="<%=jspContext%>" />
     118    <ext:stylesheets context="<%=jspContext%>" />
    107119    <script language="JavaScript">
    108120    var submitPage = 'index.jsp';
     
    279291          tooltip="Show, hide and re-order columns"
    280292        />
     293        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     294          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    281295      </tbl:toolbar>
    282296      <%
  • trunk/www/my_base/projects/list_projects.jsp

    r4698 r4887  
    4949  import="net.sf.basedb.util.formatter.Formatter"
    5050  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
     51  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     52  import="net.sf.basedb.clients.web.extensions.JspContext"
     53  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     54  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     55  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5156  import="java.util.Date"
    5257  import="java.util.List"
     
    5560<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    5661<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     62<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    5763<%!
    5864  private static final Item itemType = Item.PROJECT;
     
    8591  int numListed = 0;
    8692  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
     93  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
     94  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    8795  %>
    8896  <base:page title="<%=title==null ? "Projects" : title%>" type="<%=mode.getPageType()%>">
    8997  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
     98    <ext:scripts context="<%=jspContext%>" />
     99    <ext:stylesheets context="<%=jspContext%>" />
    90100    <script language="JavaScript">
    91101    var submitPage = 'index.jsp';
     
    305315          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    306316        />
     317        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     318          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    307319      </tbl:toolbar>
    308320      <tbl:navigator
  • trunk/www/my_base/projects/view_project.jsp

    r4698 r4887  
    5151  import="net.sf.basedb.util.formatter.Formatter"
    5252  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
     53  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     54  import="net.sf.basedb.clients.web.extensions.JspContext"
     55  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     56  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     57  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5358  import="java.util.Date"
    5459  import="java.util.Map"
     
    6065<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
    6166<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
     67<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    6268<%!
    6369  private static final Item itemType = Item.PROJECT;
     
    8894  final boolean deletePermanentlyPermission = deletePermission && !isUsed;
    8995  final boolean isOwner = project.isOwner();
     96  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, project);
     97  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    9098  %>
    91 
    9299  <base:page title="<%=title%>">
    93100  <base:head scripts="table.js,tabcontrol.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css">
     101    <ext:scripts context="<%=jspContext%>" />
     102    <ext:stylesheets context="<%=jspContext%>" />
    94103    <script language="JavaScript">
    95104    function editItem()
     
    215224        visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    216225      />
     226      <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     227        wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    217228      <tbl:button
    218229        image="help.gif"
  • trunk/www/views/items/list_items.jsp

    r4588 r4887  
    4747  import="net.sf.basedb.clients.web.util.HTML"
    4848  import="net.sf.basedb.util.Values"
     49  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     50  import="net.sf.basedb.clients.web.extensions.JspContext"
     51  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     52  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     53  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    4954  import="java.util.Set"
    5055  import="java.util.HashSet"
     
    5358<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    5459<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     60<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    5561<%!
    5662  private static final Item itemType = Item.SYSTEM;
     
    97103  }
    98104  int numListed = 0;
     105  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
     106  ExtensionsInvoker invoker = ExtensionsControl.useExtensions(jspContext, 
     107      "net.sf.basedb.clients.web.toolbar.list.all",
     108      "net.sf.basedb.clients.web.toolbar.list.allitems");
    99109  %>
    100110  <base:page title="All items">
    101111  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
     112    <ext:scripts context="<%=jspContext%>" />
     113    <ext:stylesheets context="<%=jspContext%>" />
    102114    <script language="JavaScript">
    103115    var submitPage = 'index.jsp';
     
    254266          tooltip="Show, hide and re-order columns"
    255267        />
     268        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     269          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    256270      </tbl:toolbar>
    257271      <tbl:navigator
  • trunk/www/views/jobs/list_jobs.jsp

    r4578 r4887  
    5252  import="net.sf.basedb.util.formatter.Formatter"
    5353  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
     54  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     55  import="net.sf.basedb.clients.web.extensions.JspContext"
     56  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     57  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     58  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5459  import="java.util.List"
    5560  import="java.util.Map"
     
    5863<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    5964<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     65<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    6066<%!
    6167  private static final Item itemType = Item.JOB;
     
    118124  int numListed = 0;
    119125  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
     126  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
     127  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    120128  %>
    121129  <base:page title="<%=title==null ? "Jobs" : title%>" type="<%=mode.getPageType()%>">
    122130  <base:head scripts="menu.js,table.js" styles="menu.css,table.css,progressbar.css">
     131    <ext:scripts context="<%=jspContext%>" />
     132    <ext:stylesheets context="<%=jspContext%>" />
    123133    <script language="JavaScript">
    124134    var submitPage = 'index.jsp';
     
    467477          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    468478        />
     479        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     480          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    469481      </tbl:toolbar>
    470482      <tbl:navigator
  • trunk/www/views/sessions/list_sessions.jsp

    r4511 r4887  
    5151  import="net.sf.basedb.util.formatter.Formatter"
    5252  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
     53  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     54  import="net.sf.basedb.clients.web.extensions.JspContext"
     55  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     56  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     57  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5358  import="java.util.List"
    5459  import="java.util.Map"
     
    5762<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    5863<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     64<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    5965<%!
    6066  private static final Item itemType = Item.SESSION;
     
    8995  int numListed = 0;
    9096  Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
     97  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
     98  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
    9199  %>
    92100  <base:page title="<%=title==null ? "Sessions" : title%>" type="<%=mode.getPageType()%>">
    93101  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
     102    <ext:scripts context="<%=jspContext%>" />
     103    <ext:stylesheets context="<%=jspContext%>" />
    94104    <script language="JavaScript">
    95105    var submitPage = 'index.jsp';
     
    255265          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
    256266        />
     267        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     268          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    257269      </tbl:toolbar>
    258270      <tbl:navigator
  • trunk/www/views/trashcan/list_trash.jsp

    r4511 r4887  
    4242  import="net.sf.basedb.clients.web.util.HTML"
    4343  import="net.sf.basedb.util.Values"
     44  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     45  import="net.sf.basedb.clients.web.extensions.JspContext"
     46  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     47  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     48  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    4449  import="java.util.Set"
    4550  import="java.util.HashSet"
     
    4752<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    4853<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
     54<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    4955<%!
    5056  private static final Item itemType = Item.SYSTEM;
     
    9096  }
    9197  int numListed = 0;
     98  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
     99  ExtensionsInvoker invoker = ExtensionsControl.useExtensions(jspContext, 
     100      "net.sf.basedb.clients.web.toolbar.list.all",
     101      "net.sf.basedb.clients.web.toolbar.list.trashcan");
    92102  %>
    93103  <base:page title="Trashcan">
    94104  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
     105    <ext:scripts context="<%=jspContext%>" />
     106    <ext:stylesheets context="<%=jspContext%>" />
    95107    <script language="JavaScript">
    96108    var submitPage = 'index.jsp';
     
    240252          tooltip="Show, hide and re-order columns"
    241253        />
     254        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     255          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    242256      </tbl:toolbar>
    243257      <tbl:navigator
  • trunk/www/views/trashcan/view_item.jsp

    r4511 r4887  
    5454  import="net.sf.basedb.clients.web.util.HTML"
    5555  import="net.sf.basedb.util.Values"
     56  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
     57  import="net.sf.basedb.clients.web.extensions.JspContext"
     58  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
     59  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
     60  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
    5661  import="java.util.Collections"
    5762  import="java.util.Date"
     
    6469<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
    6570<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
    66 
     71<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
    6772<%
    6873final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
     
    108113  }
    109114  String link = Base.getLink(ID, HTML.encodeTags(name), item.getType(), itemId, writePermission);
     115  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, item);
     116  ExtensionsInvoker invoker = ExtensionsControl.useExtensions(jspContext, 
     117    "net.sf.basedb.clients.web.toolbar.item.all",
     118    "net.sf.basedb.clients.web.toolbar.item.trashcan");
    110119  %>
    111 
    112120  <base:page>
    113121  <base:head scripts="tabcontrol.js,table.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css">
    114   <script language="JavaScript">
     122    <ext:scripts context="<%=jspContext%>" />
     123    <ext:stylesheets context="<%=jspContext%>" />
     124    <script language="JavaScript">
    115125    var submitPage = 'index.jsp';
    116126    var formId = 'usingItems';
     
    218228        tooltip="<%=sharePermission ? "Share this item to other user, groups and projects" : "You do not have permission to share this scan"%>"
    219229      />
     230      <ext:render extensions="<%=invoker%>" context="<%=jspContext%>"
     231        wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
    220232      <tbl:button
    221233        image="help.gif"
Note: See TracChangeset for help on using the changeset viewer.