[xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Pascal BASTIEN
Hello, I have some difficulty with my groovy/velocity code: I manage to pass some parameter between my scheduler/groovy script to my velocity code of my page but I need to check in my velocity code if my parameter exist (or not).

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Thomas Mortagne
It's not very clear how exactly are you executing this wiki content with Velocity in it ? Document#getRenderedContent call from Groovy ? On Fri, Aug 1, 2014 at 3:16 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote: Hello, I have some difficulty with my groovy/velocity code: I manage to pass

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Thomas Mortagne
And also, what is your target XWiki version ? Is it really 4.1 ? On Fri, Aug 1, 2014 at 3:28 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: It's not very clear how exactly are you executing this wiki content with Velocity in it ? Document#getRenderedContent call from Groovy ? On Fri,

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Pascal BASTIEN
) De : Thomas Mortagne thomas.morta...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Vendredi 1 août 2014 15h28 Objet : Re: [xwiki-users] How to check $xcontext.get() is empty? It's not very clear how exactly are you executing this wiki

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Pascal BASTIEN
août 2014 15h29 Objet : Re: [xwiki-users] How to check $xcontext.get() is empty? And also, what is your target XWiki version ? Is it really 4.1 ? On Fri, Aug 1, 2014 at 3:28 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: It's not very clear how exactly are you executing this wiki

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Thomas Mortagne
@xwiki.org Envoyé le : Vendredi 1 août 2014 15h29 Objet : Re: [xwiki-users] How to check $xcontext.get() is empty? And also, what is your target XWiki version ? Is it really 4.1 ? On Fri, Aug 1, 2014 at 3:28 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: It's not very clear how

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Jeremie BOUSQUET
(parameter) exist or not (in a velocity script) De : Thomas Mortagne thomas.morta...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Vendredi 1 août 2014 15h28 Objet : Re: [xwiki-users] How to check $xcontext.get

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Clemens Klein-Robbenhaar
(just because I see that syntax issue): On 08/01/2014 03:42 PM, Pascal BASTIEN wrote: This test doesn't work #if (xcontext.get(source) != $null) #set ($Source = xcontext.get(source)) #else #set ($Source = SandboxTemplate) #end Thats because $null is not the Java null, but something

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Jeremie BOUSQUET
) De : Thomas Mortagne thomas.morta...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Vendredi 1 août 2014 15h28 Objet : Re: [xwiki-users] How to check $xcontext.get() is empty? It's not very clear how exactly are you executing

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Jeremie BOUSQUET
or not (in a velocity script) De : Thomas Mortagne thomas.morta...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Vendredi 1 août 2014 15h28 Objet : Re: [xwiki-users] How to check $xcontext.get() is empty? It's

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Pascal BASTIEN
Thxs to all, but I try to explain more clairely :-) From groovy I pass (or not) some parameter at my velocity script and in velocity I simply want to check if my parameter exist or not. For the moment, i manage to writing this dirty code: In scheduler: xcontext.put(source, SandboxTemplate)

Re: [xwiki-users] How to check $xcontext.get(xxxx) is empty?

2014-08-01 Thread Pascal BASTIEN
Objet : Re: [xwiki-users] How to check $xcontext.get() is empty? Thxs to all, but I try to explain more clairely :-) From groovy I pass (or not) some parameter at my velocity script and in velocity I simply want to check if my parameter exist or not. For the moment, i manage to writing