Problems setting new SmartGWT Theme 'Tahoe'

894 Views Asked by At

Helly everybody, I'am trying to set in an sample gwt project (greeting service) the new 'Tahoe' Theme which is available in smartgwt version 6.1. I hope somebody could give me some usefull hints. My problem is, that i set all to use the new theme but if i open the project inside my browser the new skin is not working.

My code: test.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
  "http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='gwtclientserverexample'>

  <!-- Inherit the core Web Toolkit stuff.                        -->
  <inherits name='com.google.gwt.user.User'/>
  <inherits name="com.smartgwt.SmartGwtNoScript" />

  <inherits name="com.smartclient.theme.tahoe.Tahoe" />

  <!-- Specify the app entry point class.                         -->
  <entry-point class='com.sample.gwt.client.GWTClientServerExample'/>

  <!-- Specify the paths for translatable code                    -->
  <source path='client'/>
  <source path='shared'/>

  <!-- allow Super Dev Mode -->
  <add-linker name="xsiframe"/>
</module>

index.html

<!doctype html>
<!-- The DOCTYPE declaration above will set the     -->
<!-- browser's rendering engine into                -->
<!-- "Standards Mode". Replacing this declaration   -->
<!-- with a "Quirks Mode" doctype is not supported. -->

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <title>Web Application Starter Project</title>

   </head>
  <body>

    <script type="text/javascript">
        var isomorphicDir = "gwtclientserverexample/sc/";
    </script>

    <script src="gwtclientserverexample/sc/modules/ISC_Core.js?isc_version=10.1.js"></script>

    <!--include SmartClient -->
    <script src="gwtclientserverexample/sc/modules/ISC_Foundation.js?isc_version=10.1.js"></script>
    <script src="gwtclientserverexample/sc/modules/ISC_Containers.js?isc_version=10.1.js"></script>
    <script src="gwtclientserverexample/sc/modules/ISC_Grids.js?isc_version=10.1.js"></script>
    <script src="gwtclientserverexample/sc/modules/ISC_Forms.js?isc_version=10.1.js"></script>
    <script src="gwtclientserverexample/sc/modules/ISC_RichTextEditor.js?isc_version=10.1.js"></script>
    <script src="gwtclientserverexample/sc/modules/ISC_Calendar.js?isc_version=10.1.js"></script>
    <script src="gwtclientserverexample/sc/modules/ISC_DataBinding.js?isc_version=10.1.js"></script>
    <script src="gwtclientserverexample/sc/modules/ISC_Drawing.js?isc_version=10.1.js"></script>

    <!--load skin-->
    <script src="gwtclientserverexample/sc/skins/Tahoe/load_skin.js?isc_version=9.1.js"></script>

    <script type="text/javascript" language="javascript" src="gwtclientserverexample/gwtclientserverexample.nocache.js"></script>


    <h1>Web Application Starter Project</h1>

    <table align="center">
      <tr>
        <td colspan="2" style="font-weight:bold;">Please enter your name:</td>        
      </tr>
      <tr>
        <td id="nameFieldContainer"></td>
        <td id="sendButtonContainer"></td>
      </tr>
      <tr>
        <td colspan="2" style="color:red;" id="errorLabelContainer"></td>
      </tr>
    </table>
  </body>
</html>

If I open my browser the project looks so: enter image description here

2

There are 2 best solutions below

2
On

If you use this tag

<inherits name="com.smartgwt.SmartGwtNoScript" />

it will stop any script being loaded from your index.html file (including your Tahoe theme load_skin.js )

The correct tag to use for the LGPL version, if you just want to switch the default theme is

<inherits name="com.smartgwt.SmartGwtNoTheme"/>

You can find info related to this in the quickstart guide https://www.smartclient.com/releases/SmartGWT_Quick_Start_Guide.pdf on page 81, under 'Switching Theme'

0
On

I solved my problem with the help from @Alan.

I needed to include:

<inherits name="com.smartgwt.SmartGwtNoTheme" />

and not:

<inherits name="com.smartgwtee.SmartGwtEENoTheme"/>

After that i could include the new Tahoe-Skin:

<inherits name="com.smartclient.theme.tahoe.Tahoe" />

My *.gwt.xml looks now so:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  When updating your version of GWT, you should also update this DTD reference,
  so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
  "http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='gwtclientserverexample'>

  <inherits name="com.smartgwt.SmartGwtNoTheme" />
  <inherits name="com.smartclient.theme.tahoe.Tahoe" />

  <!-- Specify the app entry point class.                         -->
  <entry-point class='com.sample.gwt.client.GWTClientServerExample'/>

  <!-- Specify the paths for translatable code                    -->
  <source path='client'/>
  <source path='shared'/>

  <!-- allow Super Dev Mode -->
  <add-linker name="xsiframe"/>
</module>