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
-
... ... @@ -297,7 +297,7 @@ 297 297 298 298 {{code}} 299 299 {{groovy}} 300 -var = " toto"300 +var = "foo" 301 301 {{/groovy}} 302 302 303 303 {{velocity}} ... ... @@ -307,15 +307,15 @@ 307 307 308 308 Starting with XWiki 8.3 the Velocity bridge has been improved and it's now possible to do the opposite, i.e. define a variable in Velocity and access it from another scripting language. For example: 309 309 310 +{{code}} 310 310 {{velocity}} 311 -## Setting some script binding in Velocity 312 -#set($myvar = "toto") 312 +#set($myvar = "foo") 313 313 {{/velocity}} 314 314 315 315 {{groovy}} 316 -// Lets use the script binding that has been set in previous script 317 317 print myvar 318 318 {{/groovy}} 318 +{{/code}} 319 319 320 320 Note that you can also share variables by setting them in the XWiki Context (##xcontext## binding). 321 321