Changes for page Wiki Component API

Last modified by Admin on 2024/03/29 01:16

<
From version < 22.8 >
edited by Admin
on 2016/11/10 20:35
To version < 23.1 >
edited by Denis Gervalle
on 2016/11/21 15:56
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.Admin
1 +xwiki:XWiki.dgervalle
ExtensionCode.ExtensionClass[0]
Description
... ... @@ -57,9 +57,11 @@
57 57  
58 58  We will implement those methods using XWiki Syntax, which allows us to use [[scripting languages such as velocity or groovy>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting]].
59 59  
60 -To interact with the outside world the methods are provided with 2 variables in a special "method" context:
60 +To interact with the outside world the methods are provided with some special binding variables grouped under the "method" context:
61 61  1. **xcontext.method.input**, a Map<Integer, Object> of the arguments passed to the implemented method
62 62  1. **xcontext.method.output**, an Object that you must be set if the implemented method returns a value
63 +1. **xcontext.method.component**, a reference to **this** component (for calling a method of it from another one)
64 +1. **xcontext.method.<dependency binding name>**, reference to inject dependencies (see "Adding dependencies" below)
63 63  
64 64  Here's the code we need to implement our [[Event Listener>>https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-observation/xwiki-commons-observation-api/src/main/java/org/xwiki/observation/EventListener.java]]:
65 65  
Show installed count
... ... @@ -1,0 +1,1 @@
1 +Yes

Get Connected