Search code examples
javagwtpropertiesinternationalizationgxt

Dynamic Properties in GWT


Is there a way to load data at run time from a .properties file?

Using the Constants interface the data is hardcoded and I need to recompile for update my properties. I want to do this without recompile.

I read about the class Dictionary, but my data will be shown in the HTML host page. Is it secure?

Is there another way?


Solution

  • We use a RequestBuilder to fetch .js file with i18n string key/value pair and then parse it using GWT Dictionary class.

    GWT I18n Guide - https://developers.google.com/web-toolkit/doc/latest/DevGuideI18n

    Using GWT Dictionary - http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/i18n/client/Dictionary.html

    Note -

    1) We use it for processing only label values which require I18N.

    2) We use it with htpps, XSS and XSRF features enabled in GWT.