Announcement

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

    Grails plugin, incorrect image paths and SmartGWT

    I'm trying to get started with a HelloWorld SmartGWT on Grails and have been able (hooray?) to reproduce the bug reported here (https://svn.cargo.codehaus.org/browse/GRAILSPLUGINS-649); can anyone with more knowledge/experience of these technologies helpfully comment?

    TIA

    #2
    Can you use fiddler or firebug and report what image path's are trying to be accessed (presumably 404's) when the dialog shows?

    I've been wanting to dabble with Grails anyway and the instructions on the bug report look pretty good so I'll try running the sample myself as well.

    Thanks,
    Sanjiv

    Comment


      #3
      Image paths as reported by IE/Properties dialog

      I'll verify the paths with those tools once I find them; the path I Ctrl-C'd from IE's Properties dialog box for the blank.gif shows...

      http://localhost:9090/SmartGwtTutorial/main/js/sc/skins/SilverWave/images/blank.gif

      ...similar to the original bug report.
      The actual filesystem path to the image is:

      ...\SmartGwtTutorial\web-app\gwt\tutorial.App\js\sc\skins\SilverWave\images

      I appreciate your prompt attention, thanks!

      Comment


        #4
        Verified the image path with Firebug also

        As above....

        Comment


          #5
          Any news with this issue?

          Comment


            #6
            Same problem

            What causes this? Anyone working on it or can point me in the right direction to fix it.

            Comment


              #7
              Please star http://"http://code.google.com/p/sma...l?id=139"]this issue to get notified when its resolved.

              Workaround (from one of the comments on the issue) :

              Add the following to your host html file before the nocache.js script tag.
              <script>
              var isomorphicDir = "[MODULE_NAME]/sc/";
              </script>

              Where MODULE_NAME is the module you are building.

              Comment


                #8
                Thank you.

                Comment


                  #9
                  Doesn't works to me

                  First of all, thank you for amazing SmartGWT.

                  I just was running a SmartGWT hello world with Grails(1.1)+GWT(1.5.3)+SmartGWT(1.0b2) plugin and I got the same incorret image paths.

                  I apply the workround described here as following:
                  Code:
                  <script>
                       var isomorphicDir = "${createLinkTo(dir: 'gwt/w.x.y.mymodule.core.MainEntryPoint/sc/')}";
                  </script>
                  Unfortunately, when running on host page, the skin remains incorrect besides the events works well. From GWT Shell it works ok.

                  I appreciate any help.
                  Attached Files

                  Comment


                    #10
                    Its a little strange that some portions of the skins are loading while others aren't. If the path to the skins was incorrect, none of the images would be located.

                    Can you use firebug or fiddler to examine the requests and the 404 urls? Please attach a screenshot.

                    Comment


                      #11
                      Thanks for you reply.

                      I attached more screenshots: two was from firebug/firefox, other one was from Google Chrome when the mouse cursor was just over the button. And the last one was from firebug/firefox inspect mode, where the highlights things seems to be out of the right place.

                      By the way, response header returned all 200 Ok.
                      Attached Files
                      Last edited by danyer; 9 Apr 2009, 10:07.

                      Comment


                        #12
                        @Danyer your new problem might be something else - what does your .html file look like? Are you setting an XHTML DOCType? If so, remove that or set an HTML DOCType.

                        Comment


                          #13
                          I create the test grails application again
                          with a only GWT module named helloworld and no package.

                          Maybe someone could download it and check it out:

                          test.zip

                          After, browse to host page as following:
                          Code:
                          http://localhost:8080/test/helloworld
                          This time I use Grails(1.1)+GWT(1.6.4)+SmartGWT(1.0b2), running under a Windows Vista, and I got the same weird behavior. The host page index.gsp is in views/helloworld.

                          I agree with you that this isn't the same problem with the incorret image paths, but I'm missing something somewhere that as a GWT/Grails newbie I can't see.

                          Thanks in advance.

                          Comment


                            #14
                            Get rid of main.css from main.gsp. It changes the defaults for basic elements like "td" (table cell) and would hose almost any third-party framework.

                            Terrible practice by the way. Is this really the default Grails setup?

                            Comment


                              #15
                              Oh my goodness!! I spent a week learning Grails+GWT and that was there all the time and I couldn't see it.

                              @Isomorphic:
                              Terrible practice by the way. Is this really the default Grails setup?
                              Yes, that helloworld grails project (test.zip) was created with these simple steps:
                              Code:
                              1) >grails create-app test
                              2) >cd test
                              3) >grails install-plugin gwt
                              4) >grails create-gwt-module helloworld
                              5) >grails create-gwt-page helloworld/index.gsp helloworld
                              (I said Yes for "HelloworldController does not exist - do you want to create it now? [y/n]")
                              6) Put SmartGWT statements into helloworld.gwt.xml
                                   <inherits name="com.smartgwt.SmartGwt"/>    
                                   <inherits name="com.smartclient.theme.enterprise.Enterprise" />
                              7) Put the workaround described here into helloworld/index.gsp
                                  <script>
                                  	var isomorphicDir = "${createLinkTo(dir: 'gwt/helloworld/sc/')}";
                                  </script>
                              8) Copy SmartGWT jars to test/lib/gwt
                              7) Copy SmartGWT jars to my grails/lib too (or grails will fail when compiling)
                              8) Compile GWT module with 
                                    >grails compile-gwt-modules
                              --ignored warning:-------------------
                              Warning, target causing name overwriting of name default
                                   [echo] Compiling GWT modules
                                   [echo] Module: helloworld
                                   [java] WARNING: 'com.google.gwt.dev.GWTCompiler' is deprecated and will be
                              removed in a future release.
                                   [java] Use 'com.google.gwt.dev.Compiler' instead.
                                   [java] (To disable this warning, pass -Dgwt.nowarn.legacy.tools as a JVM arg.)
                              ------------------:-------------------
                              9) Run under GWT Shell with 
                                   >grails run-gwt-client
                                   (all rights here!)
                              10) Run grails
                                    > grails run-app
                              (now something wrong happens with the skin...)
                              
                              11) Addicional step to make things to be right: get rid of main.css from grails-app/views/layouts/main.gsp.
                              @Isomorphic,
                              Thank you very very much. Because of your kindly attention, now I can get back to Grails+GWT+SmartGWT, this wonderful three tenors.
                              Last edited by danyer; 9 Apr 2009, 21:19.

                              Comment

                              Working...
                              X