Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. VincentMassol1 +XWiki.ThomasMortagne - Content
-
... ... @@ -278,10 +278,18 @@ 278 278 The component hint used (the ##hello## part in the ##@Component##) is the name under which the script service will be accessible from scripting languages. 279 279 {{/info}} 280 280 281 -For example to access it in Velocity you'd write: {{code language="velocity"}}$services.hello.greet(){{/code}}.281 +For example to access it in Velocity you'd write: 282 282 283 -From Groovy: {{code language="groovy"}}services.hello.greet(){{/code}}. 283 +{{code language="velocity"}}{{velocity}} 284 +$services.hello.greet() 285 +{{/velocity}}{{/code}}. 284 284 287 +From Groovy: 288 + 289 +{{code language="groovy"}}{{groovy}} 290 +services.hello.greet() 291 +{{/groovy}}{{/code}}. 292 + 285 285 Now for our script service to work we need to register it as a component and thus add it to the ##META-INF/components.txt## file: 286 286 287 287 {{code language="none"}}