[xwiki-devs] Overwrite Method of Component in Velocity
Hi All, I want to create a component where i can overwrite a method of the component from velocity or groovy script inside a wiki page. Its also fine if i can "read" a groovy script to the component so i can use the defined logic. Maybe i have to use a own programmed macro for that. Is that possible? Do you use something similar somewhere? Regards, Matthias -- View this message in context: http://xwiki.475771.n2.nabble.com/Overwrite-Method-of-Component-in-Velocity-... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi Matthias, On 15 Nov 2013 at 23:37:23, Matthias Wegner (mic.mat.wegner@web.de(mailto:mic.mat.wegner@web.de)) wrote:
Hi All,
I want to create a component where i can overwrite a method of the component from velocity or groovy script inside a wiki page. Its also fine if i can "read" a groovy script to the component so i can use the defined logic. Maybe i have to use a own programmed macro for that.
Is that possible? Do you use something similar somewhere?
See http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module#HOverr... If instead you wish to write your component in java and have its behavior defined in some wiki page, you can easily do that too: * Get the XWiki Context * Get the XWikiDocument containing the wiki content * Get its content or the content of an XObject’s property * Do something with it in your java code
Regards, Matthias
participants (2)
-
Matthias Wegner -
vincent@massol.net