[xwiki-users] Obtaining a XWikiContext
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 we're running in XWiki 7.0, what is the best way to get incoming request parameter ? Thanks
One option is to use a RequestInitializer as in https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... . Hope this helps, Marius On Wed, Apr 8, 2015 at 6:20 PM, Nicolas Delsaux <[email protected]> wrote:
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 we're running in XWiki 7.0, what is the best way to get incoming request parameter ?
Thanks _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Or inject the Container component and access the request. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... Hope this helps, Marius On Wed, Apr 8, 2015 at 6:38 PM, Marius Dumitru Florea <[email protected]> wrote:
One option is to use a RequestInitializer as in https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... .
Hope this helps, Marius
On Wed, Apr 8, 2015 at 6:20 PM, Nicolas Delsaux <[email protected]> wrote:
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 we're running in XWiki 7.0, what is the best way to get incoming request parameter ?
Thanks _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
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 ([email protected](mailto:[email protected])) wrote:
One option is to use a RequestInitializer as in https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... .
Hope this helps, Marius
On Wed, Apr 8, 2015 at 6:20 PM, Nicolas Delsaux wrote:
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 we're running in XWiki 7.0, what is the best way to get incoming request parameter ?
Thanks _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
Marius Dumitru Florea -
Nicolas Delsaux -
vincent@massol.net