From version 13.2
edited by Vincent Massol
on 2019/02/08 19:30
To version 14.1
edited by Vincent Massol
on 2019/02/08 19:30
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -27,7 +27,7 @@
27 27  * Create a wiki page and transform it into a Wiki Component
28 28  * This Component will only serve as a way to define our Script Service or execute our script. It won't be used for anything else.
29 29  * The trick is that we'll have this Component implement the ##Initializable## interface (and thus implement an ##initialize()## method which is where we will define our Script Service or execute our script).
30 -* To understand why this will work, you need to understand how the Wiki Component feature of xwiki works:
30 +* To understand why this will work, you need to understand how the Wiki Component feature of XWiki works:
31 31  ** When a page containing a wiki component is created or modified, a Java component is created dynamically and registered against XWiki's Component Manager. To do this, the Component is instantiated (using a Java Dynamic Proxy) and this instance is registered. When a Component is instantiated, if it implements the ##Initializable## interface, its ##initialize()## method is called.
32 32  ** When the wiki starts, the Wiki Component feature is initialized and it looks for all wiki pages defining wiki components and registers them. And thus it instantiates the Components, and thus our ##initialize()## method is also called.
33 33  

Get Connected