Re: [xwiki-users] How to access util binding from velocity
3 Feb
2011
3 Feb
'11
2:23 p.m.
If I try:
{{velocity}} #set($map = {'name':'marius'}) $map.put('myname','adam') $map.name and $map.myname {{/velocity}}
I get:
$map.put('myname','adam') marius and adam
which is normal because the put method returns the previous value mapped to the specified key, which is null in our case.
The penny drops. When debugging velocity script I tend to dab $values all over the place and look for where they show up on the page. I hadn't considered this scenario. Dumping the map does indeed show that the entries are in there. That's fantastic - thanks for your assistance. Cheers, Adam
5685
Age (days ago)
5685
Last active (days ago)
0 comments
1 participants
participants (1)
-
xwikiadmin@lazypapertiger.org