[Engine-devel] Dynamic resource loading in GWT

Roy Golan rgolan at redhat.com
Wed Aug 7 06:59:07 UTC 2013


Painful issue here - we all know the regular drill of maintaining 
messages in many places, I18N files and so on.
Also there's a patch to make all available timezone an java enum and by 
that share it for free with the UI. its a way better than a backend Query.

But this is all hard-coded, not flexible, hard to maintain, we all know.

Why won't we make GWT load a javascript dictionary/dictionaries from a 
servlet or our host page html[1] using GWT Dictionary[3]?

that way the configuration is shared with the engine, it relies on the 
disk, customers and GSS can change it on-site and so on.


| index.html | -> | file servlet | -> |read /etc/ovirt-engine/conf/...|

     ^
      |

| GWT loads Dictionary |


candidates for dynamic resources
* I18N resources AppErrors...
* config ( just the UI subset )
* osinfo ?



[1] host page html - 
http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideHostPage
[2] Dynamic string internationalisation - 
http://www.gwtproject.org/doc/latest/DevGuideI18n.html#DevGuideDynamicStringInternationalization
[3] 
http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/client/Dictionary.html

Thanks,
Roy



More information about the Devel mailing list