(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 undefined"
A few options to check for null are given here:
http://wiki.apache.org/velocity/CheckingForNull
(however XWiki does not have that $null-tool installed and the other stuff
mentioned from Approach 4 down,
so you might try "Approach 3" there)
(and there a few '$' in front of xcontext missing ;)
Clemens
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users