We have an XPages application that is setup with help of Notes keyword documents. These keywords are made available via sessionScopes. An example of a scope variable is:
name scope: key_customer_sv
values:
default values [Yes, No]
For the values I am using a LinkedHashSet to guarantee the insertion order:
var values:java.util.LinkedHashSet = new java.util.LinkedHashSet();
var iterator = keyValues.iterator();
while (iterator.hasNext()) {
var itemvalue = iterator.next();
values.add(itemvalue);
}
map.put("values",values);
The values are stored as as HashMap and the pair names are default and values.
For my xp:radioGroup control I want to read the scope variable and return the values of the value entry.
How must I do this?
Here is what I tried:
var language = "_" + context.getLocaleString();
var languageDefault = "_" + "sv";
var key = "customer";
var values;
try{
values = sessionScope.get("key_" + key + language )['values'];
}catch(e){
print(e);
}
if (null == values){
values = sessionScope.get("key_" + key + language Default)['values'];
}
return values