Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Dynamic theme switching in the enterprise edition.

    Digging through the forum did not help me a lot, so I found my way the hard way and thought that findings may be helpful to others and that Isomorphic may want to comment too.

    And the findings are : dynamic theme switching in the enterprise edition seems to be kind of a catch 22 situation. The problem I encountered is that skins are only included in the build if they are inherited in the xxx.gwt.xml file but then they are also unconditionally loaded into the browser. Manual loading by javascript embedded in the html still works but loading all skins every time is redundant and kind of scary. If I inherit from com.smartgwtee.SmartGwtEENoTheme only and include no themes then everything works perfectly IF i copy manually the skins to sc/skins. It is of course wrong that desired behavior can only be achieved by manual intervention in the build process but this is how it seems to be. I am attaching FYI files from a modified example built-in-ds found in the EE distribution.
    Attached Files

    #2
    P.S.: There is a solution after all and it is to inherit not themes but theme resources like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-source/core/src/gwt-module.dtd">

    <module rename-to="builtinds">
    <inherits name="com.google.gwt.user.User"/>
    <inherits name="com.smartgwtee.SmartGwtEENoTheme"/>
    <inherits name="com.smartclient.theme.enterprise.EnterpriseResources"/>
    <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlueResources"/>
    <inherits name="com.smartclient.theme.graphite.GraphiteResources"/>

    <!-- The entry point(s) of the application. -->
    <entry-point class="com.smartgwt.sample.client.BuiltInDS"/>

    <!-- Specification of tartget browser(s). -->
    <!-- Should not be done in production but speeds up development. -->
    <set-property name="user.agent" value="gecko"/>
    </module>

    Comment

    Working...
    X