Hi,
On Sat, Apr 21, 2012 at 10:26 PM, jerem <jeremie.bousquet(a)gmail.com> wrote:
Hello,
In velocity I was using :
$services.rendering.parse(...)
$services.rendering.render(...)
My question is : how can I inject the component to do that from a java
component, specifying the parser/syntax ?
I just had a quick look to the tests but they use the componentManager while
I preferred to use annotations until now, so I'm a bit lost ... :)
Actually what you get in $services.rendering is very script oriented
and in Java you don't really have a unique entry point.
For example to get a parser for syntax xwiki/2.1 to produce a XDOM you
can inject the following:
@Inject
@Named("xwiki/2.1")
private Parser xwikiParser;
See
http://rendering.xwiki.org for more about rendering framework in general.
Thanks
Jeremie
--
View this message in context:
http://xwiki.475771.n2.nabble.com/How-to-call-rendering-component-tp7487904…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne