Announcement

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

    Enterprise skin still loading after custom skin

    Even when adding NoTheme and NoScript before inheriting custom theme the gwt/smartgwt compiler continues to add a double entry for loading two skins in the nocache.js file. This file is a dynamically generated file that I cannot go out and touch each time it is generated. How do I stop the additional skin loading command from being generated?

    SmartClient Version: SC_SNAPSHOT-2012-02-23_v8.2p/Pro Deployment (built 2012-02-23)

    2. Forefox 10.0.2 - OSX

    ---------------application.gwt.xml file --------------
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.1//EN"
    "http://google-web-toolkit.googlecode.com/svn/tags/2.1.1/distro-source/core/src/gwt-module.dtd">
    <module rename-to='pc2'>
    <!-- compile only for defined platform -->
    <!-- <set-property name="user.agent" value="ie6" /> -->

    <!-- Inherit the core Web Toolkit stuff. -->
    <inherits name='com.google.gwt.user.User'/>
    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
    <inherits name="com.smartgwtpro.SmartGwtProNoScript"/>
    <inherits name="com.smartgwtpro.SmartGwtProNoTheme"/>
    <inherits name="com.companyname.theme.customskin"/>
    <inherits name="com.smartgwtpro.tools.Tools"/>
    <servlet .....
    <!-- Specify the app entry point class. -->
    <entry-point class='com.company.client.Application'/>

    <!-- Client source path -->
    <source path="client" />
    </module>

    ----- application.nocache.js --------
    This gets a double entry for loading two skins each time...

    if (!__gwt_scriptsLoaded['sc/skins/customskin/load_skin.js']) {
    __gwt_scriptsLoaded['sc/skins/customskin/load_skin.js'] = true;
    document.write('<script language="javascript" src="' + base + 'sc/skins/customskin/load_skin.js"><\/script>');
    }
    if (!__gwt_scriptsLoaded['sc/skins/Enterprise/load_skin.js']) {
    __gwt_scriptsLoaded['sc/skins/Enterprise/load_skin.js'] = true;
    document.write('<script language="javascript" src="' + base + 'sc/skins/Enterprise/load_skin.js"><\/script>');
    }

    Any help would be appreciated. I cannot go in and manually edit the nocache.js file every time the application is built by someone.

    #2
    You probably just need to run a GWT compile to have your new <inherits> applied.

    Comment


      #3
      Could you please provide a little more info on how to configure the build so that the gwt compile is invoked properly and in the right sequence? Sorry for such an elementary question, but I understood that the GWT compiler was already invoked once it reads the application.gwl.xml file. Are suggesting I add another xml file or is this merely another setting in the application.gwt.xml file. Thank you.

      Comment


        #4
        It should have happened automatically and there is no special setting to enable it, however in our experience Eclipse and/or the GWT Eclipse Plugin does not always handle this properly.

        Comment


          #5
          I appreciate the quick response. We were using a gwt.xml file in a library that has nothing to do with the UI, but sure enough it was inheriting SmartGWTPro and dragging in Enterprise until the NoTheme was added. This has corrected the problem of the application.nocache.js being created with a double entry for loading two skins.

          Comment

          Working...
          X