Changes for page Component Module
Last modified by Thomas Mortagne on 2024/03/21 15:07
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. alefebvr1 +xwiki:XWiki.polx
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -143,7 +143,7 @@ 143 143 144 144 ==== Registering a Component with several Roles ==== 145 145 146 -You can make a component providing several roles by implementing the corresponding interfaces. However note that each role will produce a different instance. 146 +You can make a component providing several roles by implementing the corresponding interfaces. However note that each role will produce a different instance. This is even true if the class implements the ##Singleton## annotation; one understands that singletons are "by roles". 147 147 148 148 {{code language="java"}} 149 149 @Component ... ... @@ -511,7 +511,7 @@ 511 511 512 512 There are 2 solutions for doing this: 513 513 514 -* Solution 1: You implement the component role in a [[Scripting language>>platform:DevGuide.Scripting]] (e.g. Groovy) and register it dynamically using the Component Manager (see above for accessing it). See [[e xtensions:Extension.Create a component using Groovy]] for an example.514 +* Solution 1: You implement the component role in a [[Scripting language>>platform:DevGuide.Scripting]] (e.g. Groovy) and register it dynamically using the Component Manager (see above for accessing it). See [[snippets:Extension.Create a component using Groovy]] for an example. 515 515 * Solution 2: You use a [[Wiki Component>>extensions:Extension.WikiComponent Module]]. 516 516 517 517 If you wish to override only some methods of an existing component you can use the Solution 1, by creating a class that extends the existing component's class and that overrides only the method you wish to modify. Then, you register your component over the existing one.
- XWiki.XWikiComments[9]
-
- Date
-
... ... @@ -1,1 +1,1 @@ 1 -2019-07-18 08:58:06. 531 +2019-07-18 08:58:06.0