Sample extension is wired up properly now.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@976 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-06-15 23:33:15 +00:00
parent aeb320b97c
commit 6a3da4116a
3 changed files with 8 additions and 5 deletions

View File

@ -5,10 +5,9 @@ var ClientSideResourceManager = Packages.com.metaweb.gridworks.ClientSideResourc
/* /*
* Function invoked to initialize the extension. * Function invoked to initialize the extension.
*/ */
/*
function init() { function init() {
# Packages.java.lang.System.err.println("Initializing sample extension"); // Packages.java.lang.System.err.println("Initializing sample extension");
# Packages.java.lang.System.err.println(module.getMountPoint()); // Packages.java.lang.System.err.println(module.getMountPoint());
// Script files to inject into /project page // Script files to inject into /project page
ClientSideResourceManager.addPaths( ClientSideResourceManager.addPaths(
@ -28,7 +27,6 @@ function init() {
] ]
); );
} }
*/
/* /*
* Function invoked to handle each request in a custom way. * Function invoked to handle each request in a custom way.
@ -37,6 +35,9 @@ function process(path, request, response) {
// Analyze path and handle this request yourself. // Analyze path and handle this request yourself.
if (path == "/" || path == "") { if (path == "/" || path == "") {
var context = {};
context.someVar = "foo"; // here's how to pass things into the .vt templates
send(request, response, "index.vt", context); send(request, response, "index.vt", context);
} }
} }

View File

@ -13,6 +13,8 @@
and styles into the /project page. and styles into the /project page.
</p> </p>
<p>Here is someVar: $someVar.</p>
<p>Here is a sample list using a veloci-macro:</p> <p>Here is a sample list using a veloci-macro:</p>
#set( $greatlakes = ["Superior","Michigan","Huron","Erie","Ontario"] ) #set( $greatlakes = ["Superior","Michigan","Huron","Erie","Ontario"] )

View File

@ -5,7 +5,7 @@
core = / core = /
# Sample extension's wirings # Sample extension's wirings
# client-side resources of this module will be accessible under this URL path # Client-side resources of this module will be accessible under this URL path.
sample-extension = /extensions/sample/ sample-extension = /extensions/sample/
jython = /extensions/jython/ jython = /extensions/jython/