Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
problem with set Hashmap as a globalVariable
SaintTail
I want to localize text label by give the locale parameter from user. I have 3 labels with 2 properties files for FR and EN. In report initialize I retrieve locale text by using ResourceHandle and set it to the HashMap. Then set that HashMap to be globalvariable but when I retreive it from label, it contains only last element of the key, text that I put to the map during initialize.
How this problem should be solve?
Thank you, Eak
Find more posts tagged with
Comments
JasonW
If you have the locale string as a parameter why do you need a hashmap? Just overide the oncreate for the label and put in something like this:
importPackage(Packages.java.util);
var lc = new Locale(params["localestring"].value ); //new Locale("de_DE");
this.text = reportContext.getMessage("text1", lc);
Jason