Announcement

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

    Working GWT with Smartgwt

    Thanks for someone's response in advance

    i installed GWT 1.6 to eclipse. and added smartgwt 1.0b2 to eclipse's project.
    so, i wrote simple code on GWT Web Application project.

    but GWT App Engine could not find resource files of smartgwt skin(default enterprise skin)

    i could create smartgwt widget object, but image files of smartgwt widgets doest not display.

    2009. 4. 9 오후 5:33:07 com.google.appengine.tools.development.LocalResourceFileServlet doGet
    WARNING: No file found for: /sc/skins/Enterprise/skin_styles.css
    2009. 4. 9 오후 5:33:18 com.google.appengine.tools.development.LocalResourceFileServlet doGet
    WARNING: No file found for: /sc/skins/Enterprise/images/blank.gif
    2009. 4. 9 오후 5:33:18 com.google.appengine.tools.development.LocalResourceFileServlet doGet
    WARNING: No file found for: /sc/skins/Enterprise/images/blank.gif

    what is the solution about it?

    p.s) i have installed Google Widget Toolkit plugin for Eclipse 3.4. and i would like to use smartgwt with it
    Last edited by iloveuu; 9 Apr 2009, 00:57.

    #2
    Hi,

    Could you please post your GWT module *.gwt.xml file?


    Does the application work aside from the missing skin images? If so, could you check with firebug and/or server access logs at which location it tries to load these images, and if those images are by any chance located in another directory on your server?

    I once had to set the isomorphicDir variable to tell SmartClient where it should look for these files (in this example I did it with freemarker + spring, and my modules are deployed to the /gwt/ directory on my server):
    Code:
        <script type="text/javascript">
        var isomorphicDir = "<@spring.url "/gwt/my.module.name.ModuleName/sc/"/>";
        </script>
    But by default the isomorphicDir variable should work out of the box (if you did not customize where you deploy everything)...

    Comment


      #3
      Thanks for your response

      i wrote smartgwt config in Project.gwt.xml and attached smartgwt.jar to my eclipse project.
      there are resource files(skin image etc) in smartgwt.jar.

      what is the problem?

      <?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='smartgwt'>
      <!-- Inherit the core Web Toolkit stuff. -->
      <inherits name='com.google.gwt.user.User'/>

      <!-- Inherit the default GWT style sheet. You can change -->
      <!-- the theme of your GWT application by uncommenting -->
      <!-- any one of the following lines. -->
      <inherits name='com.google.gwt.user.theme.standard.Standard'/>
      <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
      <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->

      <!-- Other module inherits -->
      <inherits name='com.smartgwt.SmartGwt'/>

      <!-- Specify the app entry point class. -->
      <entry-point class='kr.ac.yu.dblab.smartgwt.client.SmartGWT'/>
      </module>
      Attached Files

      Comment


        #4
        Hi,

        I think the problem might be caused by your "rename-to" attribute in your module definition:
        Code:
        <module rename-to='smartgwt'>
        From the GWT documentation here:

        Renaming modules

        The <module> element supports an optional attribute rename-to that causes the compiler to behave as though the module had a different name than the long, fully-qualified name. Renaming a module has two primary use cases:

        * to have a shorter module name that doesn't reflect the actual package structure, this is the most typical and recommended use case
        * to create a "working module" to speed up development time by restricting the number of permutations

        com.foo.WorkingModule.gwt.xml:

        Code:
        <module rename-to="com.foo.MyModule">
          <inherits name="com.foo.MyModule" />
          <set-property name="user.agent" value="ie6" />
          <set-property name="locale" value="default" />
        </module>
        I think renaming your module to "smartgwt" might be the cause of the problem, and smartclient thinks the image files are in a different directory than they are really.


        You could try removing the "rename-to" attribute in your SmartGwt.gwt.xml:
        Code:
        <module>
        Another idea might be to define the "isomorphicDir" javascript variable like I said earlier, to tell smartclient in which directory it should look for the smartclient files.

        PS: I don't know if it matters, but maybe the fact you named your module "SmartGwt.gwt.xml" will cause conflicts with the SmartGwt.gwt.xml present in the smartgwt jar? You could try to change it to something else too
        Last edited by TylerGalt; 9 Apr 2009, 02:36.

        Comment


          #5
          Doing a search for "rename-to" in this forum, I found someone who had a very similar problem (see how he got 404 errors for the skins directory files) and solved it:

          http://forums.smartclient.com/showthread.php?t=4773

          Hope this helps,

          -TG

          Comment


            #6
            Thanks a lot

            I saw the thread u showed.

            that's it i want to find. i can find the answer about it for you.

            thanks a lot.

            Comment

            Working...
            X