Changeset 1019
- Timestamp:
- Apr 3, 2009, 9:14:51 AM (14 years ago)
- Location:
- extensions/net.sf.basedb.examples/trunk
- Files:
-
- 9 added
- 6 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.examples/trunk/META-INF/extensions.xml
r682 r1019 1 1 <?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."> 3 4 <about> 4 5 <name>Extensions example package</name> … … 12 13 </about> 13 14 <extension 14 id=" net.sf.basedb.clients.web.menu.extensions.helloworld"15 id="menu.helloworld" 15 16 extends="net.sf.basedb.clients.web.menu.extensions" 16 17 > … … 30 31 </extension> 31 32 <extension 32 id=" net.sf.basedb.clients.web.menu.extensions.helloworldsimple"33 id="menu.helloworldsimple" 33 34 extends="net.sf.basedb.clients.web.menu.extensions" 34 35 > … … 57 58 58 59 <extension 59 id=" net.sf.basedb.clients.web.menu.extensions.helloworldfactory"60 id="menu.helloworldfactory" 60 61 extends="net.sf.basedb.clients.web.menu.extensions" 61 62 > … … 70 71 <action-factory> 71 72 <factory-class> 72 net.sf.basedb.examples.extensions. HelloWorldFactory73 net.sf.basedb.examples.extensions.menu.HelloWorldFactory 73 74 </factory-class> 74 75 </action-factory> … … 76 77 77 78 <extension 78 id=" net.sf.basedb.clients.web.menu.extensions.hellouser"79 id="menu.hellouser" 79 80 extends="net.sf.basedb.clients.web.menu.extensions" 80 81 > … … 90 91 <action-factory> 91 92 <factory-class> 92 net.sf.basedb.examples.extensions. HelloUserFactory93 net.sf.basedb.examples.extensions.menu.HelloUserFactory 93 94 </factory-class> 94 95 <parameters> … … 100 101 101 102 <extension 102 id=" net.sf.basedb.clients.web.menu.extensions.hellojspworld"103 id="menu.hellojspworld" 103 104 extends="net.sf.basedb.clients.web.menu.extensions" 104 105 > … … 125 126 </extension> 126 127 <extension 127 id=" net.sf.basedb.clients.web.menu.extensions.helloxjspworld"128 id="menu.helloxjspworld" 128 129 extends="net.sf.basedb.clients.web.menu.extensions" 129 130 > … … 153 154 </extension> 154 155 <extension 155 id=" net.sf.basedb.clients.web.menu.extensions.helloservletworld"156 id="menu.helloservletworld" 156 157 extends="net.sf.basedb.clients.web.menu.extensions" 157 158 > … … 178 179 </extension> 179 180 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 180 234 </extensions> -
extensions/net.sf.basedb.examples/trunk/META-INF/servlets.xml
r656 r1019 3 3 <servlet> 4 4 <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> 6 6 <init-param> 7 7 <param-name>template</param-name> -
extensions/net.sf.basedb.examples/trunk/README
r691 r1019 1 1 == Requirements == 2 2 3 1. BASE 2. 7.0 or later.3 1. BASE 2.12.0 or later. 4 4 5 5 == Introduction == … … 16 16 * Hello Servlet world! - Uses a servlet to generate the message 17 17 18 There are also a few toolbar button extensions: 19 20 * More info - A toolbar button on all single-item toolbars and 21 displays some information in a popup window about the current item. 22 * Annotation filter - A toolbar button on all list pages for annotatable 23 items which allows a user to show only items with/without annotations. 24 18 25 == Installation == 19 26 20 27 1. Unpack the tar.gz file to a directory of your choice. 21 28 2. Copy the extension-examples.jar to your BASE extensions directory: WEB-INF/extensions. 22 3. Run the ' Extensions -> Manual scan' command if you have disabled automatic29 3. Run the ''Extensions -> Manual scan'' command if you have disabled automatic 23 30 installation. Otherwise, just wait a bit and the automatic installation will 24 31 find and install the new extensions. 25 32 4. If you are logged in, you may have to logout and then login again to see 26 the new menu items .27 5. The ' Hello X-JSP world' example requires that the X-JSP compiler is installed33 the new menu items, or use the ''File -> Reload permissions'' menu. 34 5. The ''Hello X-JSP world'' example requires that the X-JSP compiler is installed 28 35 on the server. Read in the documentation how to do this. 29 36 http://base.thep.lu.se/chrome/site/latest/html/admindoc/extensions/admin.extensions.html -
extensions/net.sf.basedb.examples/trunk/RELEASE
r694 r1019 11 11 sure. 12 12 13 2. Update the version number in build.xml.13 2. Update the version number. 14 14 15 <property name="version" value="A.B" /> 15 * In build.xml: <property name="version" value="A.B" /> 16 * In META-INF/extensions.xml: <version>A.B</version> 16 17 17 18 3. Make sure that the code compiles and can be packaged. -
extensions/net.sf.basedb.examples/trunk/build.xml
r694 r1019 22 22 <property name="javac.encoding" value="ISO-8859-1" /> 23 23 <property name="depend.jars" 24 value="http://base2.thep.lu.se/base/jars/2. 7.0"24 value="http://base2.thep.lu.se/base/jars/2.12.0" 25 25 description="The location of the BASE core JARs that we depend on" 26 26 /> -
extensions/net.sf.basedb.examples/trunk/resources/hello_world.xjsp
r682 r1019 2 2 import="net.sf.basedb.core.User" 3 3 import="net.sf.basedb.clients.web.util.HTML" 4 import="net.sf.basedb.examples.extensions. HelloXJspWorld"4 import="net.sf.basedb.examples.extensions.servlet.HelloXJspWorld" 5 5 %> 6 6 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> 7 7 <% 8 9 8 final HelloXJspWorld hello = new HelloXJspWorld(pageContext); 10 9 final String ID = hello.getSessionId(); 11 10 final User current = hello.getLoggedInUser(); 12 13 11 %> 14 12 <base:page type="popup" title="Hello X-JSP world"> -
extensions/net.sf.basedb.examples/trunk/src/net/sf/basedb/examples/extensions/menu/HelloUserFactory.java
r690 r1019 1 package net.sf.basedb.examples.extensions ;1 package net.sf.basedb.examples.extensions.menu; 2 2 3 3 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory; -
extensions/net.sf.basedb.examples/trunk/src/net/sf/basedb/examples/extensions/menu/HelloWorldFactory.java
r690 r1019 1 package net.sf.basedb.examples.extensions ;1 package net.sf.basedb.examples.extensions.menu; 2 2 3 3 import net.sf.basedb.clients.web.extensions.JspContext; -
extensions/net.sf.basedb.examples/trunk/src/net/sf/basedb/examples/extensions/servlet/HelloWorldServlet.java
r690 r1019 1 package net.sf.basedb.examples.extensions ;1 package net.sf.basedb.examples.extensions.servlet; 2 2 3 3 import java.io.IOException; -
extensions/net.sf.basedb.examples/trunk/src/net/sf/basedb/examples/extensions/xjsp/HelloXJspWorld.java
r690 r1019 1 package net.sf.basedb.examples.extensions ;1 package net.sf.basedb.examples.extensions.xjsp; 2 2 3 3 import javax.servlet.jsp.PageContext;
Note: See TracChangeset
for help on using the changeset viewer.