Pascal Voitot wrote:
Hello,
I create a JSX object with parse option enabled and in the code I put
something like:
doit("${my_vm_variable}")
in my XWiki doc, i put:
#set($my_vm_variable = "my_value")
$xwiki.jsx.use("my_jsx_doc")
This does not work because these two documents are parsed during
different requests, so different velocity contexts.
But, the variables are not interpreted... (I also
tried to put the variable
in the jsx doc but doesn't work either)
This should work. Are you sure you're defining the variables the correct
way? Also make sure the page was not cached. During development I use a
"forbid" cache policy to make sure I don't see stale pages.
I may misunderstand something :)
Well, "parse" is supposed to do what you said, parse the content using
velocity. Just keep in mind that it is parsed in a separate, clean
context, just with the bare variables in it: $doc, $request, $response,
$xwiki, $context, $msg and a few others.
regards
Pascal
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Sergiu Dumitriu
http://purl.org/net/sergiu/