Changes for page Scripting
Last modified by Mohammad Humayun Khan on 2021/07/22
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
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.