BIRT Exchange Forum: problem with set Hashmap as a globalVariable - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

problem with set Hashmap as a globalVariable Rate Topic: -----

#1 User is offline   SaintTail Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 14-May 12


Posted 06 June 2012 - 02:56 AM

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

Attached File(s)


0

#2 User is offline   JasonW Icon

  • Senior Member
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 2505
  • Joined: 08-August 07


Posted 06 June 2012 - 04:35 PM

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
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users