The context is associated to the request, so if you execute a new HTTP
request you get a new context. If you want to pass informations you
will have to use query string.
That said, request to get a JSON result are already special request
because you don't want to end up with the skin: usually you use
something like
http://mydomain/xwiki/bin/get/MySpace/MyPage?outputSyntax=plain
so you could test $xcontext.action == 'get' for example.
On Sat, Jul 9, 2016 at 11:55 PM, dullfig <dan.u(a)grmcompany.com> wrote:
Hello:
I was wondering, if a page calls itself as a JSON provider, is the context
preserved? or do I need to pass information to itself in the query string?
the way I have it call itself is that, if the query string is empty, it
assumes you want to display the page, but if the query string has
parameters, it assumes it needs to return JSON.
Dan
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Page-calling-itself-as-JSON-source-tp7600…
Sent from the XWiki- Users mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne