Re: [xwiki-users] Obtaining a XWikiContext

2015-04-08 Thread Marius Dumitru Florea
Or inject the Container component and access the request. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-containers/xwiki-platform-container-api/src/main/java/org/xwiki/container/Container.java Hope this helps, Marius On Wed, Apr 8, 2015 at 6:38 PM,

Re: [xwiki-users] Obtaining a XWikiContext

2015-04-08 Thread vinc...@massol.net
Another option is to get inject a Container component: @Inject Container container; then container.getRequest() and if you need to access HTTP parameters: ((ServletRequest) container.getRequest).getHttpServletRequest() Thanks -Vincent On 8 Apr 2015 at 17:38:23, Marius Dumitru Florea

[xwiki-users] Obtaining a XWikiContext

2015-04-08 Thread Nicolas Delsaux
Hi, for one of our projects, we're creating a XWiki component, based upon this documentation (http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents). In documentation, it is said we can access the XWikiContext, which is also said to be deprecated. Considering that, and the fact

Re: [xwiki-users] Obtaining a XWikiContext

2015-04-08 Thread Marius Dumitru Florea
One option is to use a RequestInitializer as in https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-sheet/xwiki-platform-sheet-api/src/main/java/org/xwiki/sheet/internal/SheetRequestInitializer.java . Hope this helps, Marius On Wed, Apr 8, 2015 at 6:20 PM,