Announcement

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

    Portlet + skins = problem

    Hello,

    I'm trying to make SmartGwt Pro 2.4 work within a Portlet (JSR 168) in JBoss Portal 2.6.2

    I followed this tutorial and added SmartGwt on the GWT app: http://xantorohara.blogspot.com/2007...s-and-gwt.html

    Everything works fine, except for the skins : due to the manipulation required to run the application as portlet (see the example or my attached file), the relative path of the application is changed, and SmartGwt tries to reach the images and css files at the wrong address:

    Code:
    <img src="http://127.0.0.1:8080/portal/portal/default/my_module/sc/skins/Enterprise/images/Dialog/say.png" ...>
    the correct PATH would be :

    Code:
    <img src="http://127.0.0.1:8080/MY_APPLICATION/my_module/sc/skins/Enterprise/images/Dialog/say.png" ...>
    I also found another person with the same problem : http://www.liferay.com/community/wik...+a+GWT+Portlet (last comment, written by "Chitrabhanu Das")


    Is there a way to change the address where SmartGwt is reaching the images relative to the skins ?



    Thanks !
    Attached Files

    #2
    Try adding

    Code:
    <script> var isomorphicDir = "MY_APPLICATION/my_module/sc"; </script>
    in your host html file.

    Comment


      #3
      Hi and thanks for the answer.

      Unfortunately, changing the isomorphic directory doesn't solve my problem. Here is why :


      what the application running as portlet does:

      Code:
      <img src="http://127.0.0.1:8080/portal/portal/default/${isomorphicDir}/skins/Enterprise/images/Dialog/say.png" ...>
      what it should do:

      Code:
      <img src="http://127.0.0.1:8080/${isomorphicDir}/skins/Enterprise/images/Dialog/say.png" ...>
      Once again, the problem is that SmartGwt doesn't know that it is running as portlet, and that it should use a different path to load the images.

      Is there any solution ?

      Thanks !

      Comment


        #4
        I've found a temporary solution by writing a rewrite rule in my JBoss AS, so that each time SmartGwt tries to reach the skins css & images at the wrong address, it is redirected to the correct address.

        Is there any way to solve my problem in a clean way, that is to make SmartGwt understand that my application source is not located on http://127.0.0.1:8080/portal/portal/default/MY_APP (where the portlet is being executed) but on http://127.0.0.1:8080/MY_APP

        Comment


          #5
          Any idea ?

          Comment

          Working...
          X