Announcement

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

    SmartGWT + Cross-Site

    After integrating SmartGWT into the GWT part of our project I noticed a problem after deploying it on the server. For some reason all the graphical components of SmartGWT were missing (In my case a ListGrid) while the functional parts were still working (sorting, the drop-down menu, grouping ...).
    After some tests I found out that everything works well as long as there is no cross site scripting involved.
    Is there something similar to GWTs <add-linker name="xs" /> for SmartGWT?

    #2
    Is it possible that the paths of the images in your deployment are incorrect? Try running Fiddler or Firebug to monitor the http traffic and report back what you see when requests for images are made.

    Sanjiv

    Comment


      #3
      Yes, Firebug tells me upon inspection that he tries to access the image files of the "/sc/skins/SilverWave/images/ListGrid" directory on the wrong server.
      Is there a way of telling him to use the directory where I deployed the gwt .js file as a starting point?

      Comment


        #4
        Can you post the deployment directory / server structure ( file system or logical )? To bad this forum doesn't support attachments but if you can host a screenshot image somewhere then you can link to it by placing them between [ img ] tags.

        Comment


          #5
          We managed to find a quick but dirty fix for the problem that probably explains it best:

          After editing the load_skin.js file and replacing the [ISOMORPHIC] part with the absolute address everything works as intended.
          Code:
          //----------------------------------------
          // Specify skin directory
          //----------------------------------------
              // must be relative to your application file or isomorphicDir
              //isc.Page.setSkinDir("[ISOMORPHIC]/skins/SilverWave/")
              isc.Page.setSkinDir("https://test.server.com/gwtSearchInclude/sc/skins/SilverWave/")
          Is there a way to configure that instead of replacing it?

          Comment


            #6
            What you have right now is probably the smallest customization - somewhere there has to be a call to setSkinDir() indicating the hostname. It could moved out of the load_skin.js file so long as the rest of the logic in that file also executes after setSkinDir() is called.

            Comment

            Working...
            X