<
From version < 47.5 >
edited by Vincent Massol
on 2014/05/14
To version < 47.6 >
edited by Vincent Massol
on 2014/10/03
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -283,7 +283,7 @@
283 283  
284 284  = Share variable between languages =
285 285  
286 -Most JSR223 based scripting languages reinject the created variable in the current ScriptContext which means you can define a variable in a Groovy script and reuse it in a following Python script for example.
286 +Most JSR223 based scripting languages reinject the created variable in the current ##ScriptContext## which means you can define a variable in a Groovy script and reuse it in a following Python script for example.
287 287  
288 288  Since 4.1M2 a bridge has been written for Velocity (which is not based on JSR223) to allow it to access the current ScriptContext variable so you can do things like:
289 289  
... ... @@ -297,6 +297,8 @@
297 297  {{/velocity}}
298 298  {{/code}}
299 299  
300 +Note that you can also share variables by setting them in the XWiki Context (##xcontext## binding).
301 +
300 300  = Scripting In XWiki Syntax 1.0 =
301 301  
302 302  XWiki Syntax 1.0 is rendered by an old rendering engine which is still supported but for which no further development is planned (it will eventually be removed). Syntax 1.0 has some idiosyncrasies which were solved by syntax 2.0.

Get Connected