Ignore:
Timestamp:
Apr 3, 2009, 9:14:51 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #189: Add toolbar extension examples

Added "Annotation filter" and "More info" examples. Restructured the project.

Location:
extensions/net.sf.basedb.examples/trunk/META-INF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.examples/trunk/META-INF/extensions.xml

    r682 r1019  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <extensions xmlns="http://base.thep.lu.se/extensions.xsd">
     2<extensions xmlns="http://base.thep.lu.se/extensions.xsd"
     3  id-base="net.sf.basedb.examples.extensions.">
    34  <about>
    45    <name>Extensions example package</name>
     
    1213  </about>
    1314  <extension
    14     id="net.sf.basedb.clients.web.menu.extensions.helloworld"
     15    id="menu.helloworld"
    1516    extends="net.sf.basedb.clients.web.menu.extensions"
    1617    >
     
    3031  </extension>
    3132  <extension
    32     id="net.sf.basedb.clients.web.menu.extensions.helloworldsimple"
     33    id="menu.helloworldsimple"
    3334    extends="net.sf.basedb.clients.web.menu.extensions"
    3435    >
     
    5758 
    5859  <extension
    59     id="net.sf.basedb.clients.web.menu.extensions.helloworldfactory"
     60    id="menu.helloworldfactory"
    6061    extends="net.sf.basedb.clients.web.menu.extensions"
    6162    >
     
    7071    <action-factory>
    7172      <factory-class>
    72         net.sf.basedb.examples.extensions.HelloWorldFactory
     73        net.sf.basedb.examples.extensions.menu.HelloWorldFactory
    7374      </factory-class>
    7475    </action-factory>
     
    7677 
    7778  <extension
    78     id="net.sf.basedb.clients.web.menu.extensions.hellouser"
     79    id="menu.hellouser"
    7980    extends="net.sf.basedb.clients.web.menu.extensions"
    8081    >
     
    9091    <action-factory>
    9192      <factory-class>
    92         net.sf.basedb.examples.extensions.HelloUserFactory
     93        net.sf.basedb.examples.extensions.menu.HelloUserFactory
    9394      </factory-class>
    9495      <parameters>
     
    100101
    101102  <extension
    102     id="net.sf.basedb.clients.web.menu.extensions.hellojspworld"
     103    id="menu.hellojspworld"
    103104    extends="net.sf.basedb.clients.web.menu.extensions"
    104105    >
     
    125126  </extension>
    126127  <extension
    127     id="net.sf.basedb.clients.web.menu.extensions.helloxjspworld"
     128    id="menu.helloxjspworld"
    128129    extends="net.sf.basedb.clients.web.menu.extensions"
    129130    >
     
    153154  </extension>
    154155  <extension
    155     id="net.sf.basedb.clients.web.menu.extensions.helloservletworld"
     156    id="menu.helloservletworld"
    156157    extends="net.sf.basedb.clients.web.menu.extensions"
    157158    >
     
    178179  </extension>
    179180
     181  <extension
     182    id="toolbar.iteminfo"
     183    extends="net.sf.basedb.clients.web.toolbar.item.all"
     184    >
     185    <index>1</index>
     186    <about>
     187      <name>Show item info</name>
     188      <description>
     189        This example creates a toolbar button on all single-item
     190        pages that opens a JSP page that displays some information
     191        about the item.
     192      </description>
     193    </about>
     194    <action-factory>
     195      <factory-class>
     196        net.sf.basedb.examples.extensions.toolbar.InfoButtonFactory
     197      </factory-class>
     198      <parameters>
     199        <title>More info...</title>
     200        <tooltip>Show some information about $NAME</tooltip>
     201        <icon>/images/info.gif</icon>
     202        <onClick>Examples.showItemInfo('$TYPE', $ID)</onClick>
     203        <script>~/scripts/examples.jsp</script>
     204      </parameters>
     205    </action-factory>
     206  </extension>
     207  <extension
     208    id="toolbar.filterselected"
     209    extends="net.sf.basedb.clients.web.toolbar.list.annotatable"
     210    >
     211    <index>1</index>
     212    <about>
     213      <name>Annotation filter</name>
     214      <description>
     215        This example creates a toolbar button that can apply a
     216        special filter for showing only items that has been
     217        annotated or only items that has no annotations.
     218      </description>
     219    </about>
     220    <action-factory>
     221      <factory-class>
     222        net.sf.basedb.examples.extensions.toolbar.InfoButtonFactory
     223      </factory-class>
     224      <parameters>
     225        <title>Annotation filter...</title>
     226        <tooltip>Filter items based on if they have been annotated or not</tooltip>
     227        <icon>/images/filter.gif</icon>
     228        <onClick>Examples.filterAnnotated('$TYPE')</onClick>
     229        <script>~/scripts/examples.jsp</script>
     230      </parameters>
     231    </action-factory>
     232  </extension>
     233
    180234</extensions>
  • extensions/net.sf.basedb.examples/trunk/META-INF/servlets.xml

    r656 r1019  
    33  <servlet>
    44    <servlet-name>HelloWorld</servlet-name>
    5     <servlet-class>net.sf.basedb.examples.extensions.HelloWorldServlet</servlet-class>
     5    <servlet-class>net.sf.basedb.examples.extensions.servlet.HelloWorldServlet</servlet-class>
    66    <init-param>
    77      <param-name>template</param-name>
Note: See TracChangeset for help on using the changeset viewer.