Hi,
To access to velocity variables from your javascript extension, you need to
enable "Parse content" option of the JavaScriptExtension object.
That means that your javascript code will be processed by velocity when
page is rendered.
Then to share a variable between your page and the javascript extension,
you can use:
## in macro
$xcontext.put("param", "$xcontext.macro.parameter.foo")
// in javascript extension
def param = "$xcontext.get("param")";
Note: I didn't test that, so I don't know if it works - maybe there's a
different way to do.
BR,
Jeremie
2014-05-12 19:00 GMT+02:00 Eduardo Abritta <eduardo.abritta(a)outlook.com>om>:
Hi Sirs,
I am developing a macro in velocity (wiki macro) and need to use a
parameter (wiki macro parameter) defined by the user in my java script code
(java script extension). I tried can several methods but it is not working.
How can I do this?
Atenciosamente,
Eduardo Abritta
e-mail: eduardo.abritta(a)outlook.com |
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users