Thursday, November 12, 2015

Re: How to Load GWT theme Dynamically

There are a myriad set of approaches that you can use

The easiest way to do this with GWT, is to inherit them both and have a primary stylename which differentiates them where different, then apply that primary style name to the body.

Another ploy is to not use inherits for particular pieces, but use resources.  Then programmatically load the resources.

Finally, you could also create multiple modules for each theme, then use a servlet/jsp or some other logic in an entry point to switch/import the appropriate modules.

On Thursday, November 12, 2015 at 3:18:37 AM UTC-7, abdul wrote:
I have an application built on GWT with internationaliation. I want to load the GWT theme dynamically.For example:If (`localhost:8080/GWTApps/app.html`) then load this `<inherits name='com.google.gwt.user.theme.clean.Clean'/>` theme or else (`localhost:8080/GWTApps/app.html&local=ar`) load this `<inherits name='com.google.gwt.user.theme.clean.CleanRTL'/>`.How to achieve this dynamically any idea or thoughts on this?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment