Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Map in velocity context

$
0
0
Hi,

I'm trying to access a map I've added in the template context of a select custom query:

Code:

HashMap<String, String> severityLocalizer = new HashMap<String, String>();
[...]
req.addToTemplateContext("sevMapper", severityLocalizer);
return super.executeFetch(req);

I tried various ways to access the map (based on my experience, and then on the velocity documentation):

$sevMapper.key
$sevMapper.get("key")
$sevMapper["key"]
${sevMapper.get("key")}
etc...

Did I miss something ? How can I access that map from my custom query ? I've also tried using the $rawValue prefix, no success...

Many thanks for your help,

Thomas

Viewing all articles
Browse latest Browse all 4756

Trending Articles