Perhaps this is already doable as per my guess below
(groovestry newb here)
It would be nice to be able to use groovy as an
altenative to tapestry's script xml specifications when
passing javascript into the body component. Without
this feature being dependent on the component using
this feature extending ScriptComponent.
Effectively, I'd like to do something like:
Retrieve a groovy script/class and have it generate the
strings for body.addInitializationScript() and
body.addBodyScript() .
Perhaps something like this, using the current API will
work??
(in MyComponent.java)
ScriptResolver resolver = new ScriptResolver();
IScriptReference reference =
resolver.findscript("MyComponent_js.groovy", this,
componentLocation);
Object groovyScript = reference.getObject();
body.addInitializationScript(groovyScript.createInit(myArgs));
body.addBodyScript(groovyScript.createBody(myArgs));