Hi Lewis, On Mon, Sep 28, 2009 at 10:04 PM, Lewis Denizen <[email protected]> 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 you can !!! You can do this in groovy as: <code> import com.xpn.xwiki.web.Utils; import org.xwiki.bridge.DocumentAccessBridge; def dab = Utils.getComponent(DocumentAccessBridge.class); </code> Have fun! - Asiri
Again, great great great work with XWiki 2.0!
-- Lewis _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users