On Sep 28, 2009, at 6:46 PM, Vincent Massol wrote:
On Sep 28, 2009, at 6:34 PM, Lewis Denizen wrote:
Hi xwiki-users,
I've been playing with this new Wiki Macros stuff (this stuff is
superb!),
but I've got one question. In a conventional 2.0 Java Macro, I can
inject
things like DAOs and AccessBridges (like DocumentAccessBridge). Is
this
possible using the new Wiki Macros (for example, how can I inject a
DocumentAccessBridge into a Groovy class defined within the Wiki
Macro? Is
there a static ComponentManager that can perform lookups())?
Yes, for now you can use:
Utils.getComponent(TheComponentClass.class)
or
Utils.getComponent(TheComponentClass.class, String hint)
Forgot to mention you'll need to import:
import com.xpn.xwiki.web.*
-Vincent
-Vincent
>
> Again, great great great work with XWiki 2.0!
>
> -- Lewis