Try to inject DocumentAccessBridge:
https://github.com/xwiki/xwiki-platform/blob/a28f5d4f98b5011e59fd0781ea608dec0a934386/xwiki-platform-core/xwiki-platform-bridge/src/main/java/org/xwiki/bridge/DocumentAccessBridge.java#L69

2016-04-13 11:21 GMT+02:00 abtv <[email protected]>:

> I extended AbstractMacro with my class. When I execute macro with `execute`
> function I don't have access to the space name on which the macro is
> called.
> I would like to customize output depending on the current space. All I need
> is just space name as a string. How to get space name inside `execute`
> function? I suppose it can be some dependency injection, but I'm don't know
> what to use.
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/How-to-get-space-name-s-when-I-execute-macro-in-java-tp7598966.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Guillaume Delhumeau ([email protected])
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to