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, Marius Dumitru Florea
mariusdumitru.flo...@xwiki.com wrote:
 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, Nicolas Delsaux nicolas.dels...@gmx.fr 
 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
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


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 
(mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) wrote:

 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, 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
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[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 we're running in XWiki 7.0, what is the 
best way to get incoming request parameter ?


Thanks
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


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, Nicolas Delsaux nicolas.dels...@gmx.fr 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
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users