the second parameter is called data in your code and
it's already a
XWikiContext object you don't have to do a hack to get it.
Sorry... yes, i got
it now, but if source is an XWIKIDocument and data is
an XWIKIContext, why they are called source and data ? i'll change them in
my code to document and context.
The preferred method is still to access the execution
context.
So i will keep it like that
2014-05-21 18:47 GMT+01:00 Sergiu Dumitriu <sergiu(a)xwiki.org>rg>:
On 05/21/2014 01:44 PM, Thomas Mortagne wrote:
On Wed, May 21, 2014 at 7:25 PM, walid yaich
<walid.yaich(a)gmail.com>
wrote:
> As I said in the preview mail data is the
XWikiContext.
I'm sorry, i didn't understand exactly what you mean by
"data is the
XWikiContext."
You are in the following method:
void onEvent(Event event, Object source, Object data)
the second parameter is called data in your code and it's already a
XWikiContext object you don't have to do a hack to get it.
Note that the xcontext is sent as the "data" parameter as a convenience,
since historically there was no other way of getting hold of it. It is
not guaranteed that this will continue to happen. The preferred method
is still to access the execution context.
--
Sergiu Dumitriu
http://purl.org/net/sergiu
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs