Announcement

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

    developer console not showing properly

    Hi there,
    trying to get smartGWT integrated into a fairly large app, and having some trouble getting certain things to render. Decided that I would try the developer console, but it turns out that I can't get it to load either. When I put isc.showLogs() in the browser on my smartgwt page, it goes to the following url:
    http://localhost:8080/lusight-webapp/admin/js/sc/system/helpers/Log.html

    which does not exist, because the path before /js/sc/system... is wrong. If I manually type the following path in (which uses the base path for my smartgwt app), I get the menus for the developer console but they're all munged together and nothing else is visible:

    http://localhost:8080/lusight-webapp/admin/gwt/compiled/com.lusight.gwt.ModelBuilder/js/sc/system/helpers/Log.html

    I'm not sure if this is just because I'm going to a page that doesn't get initialized properly unless it's called via the showLogs() call, or whether something else is broken.

    On a (possibly related, but not sure) note, my smartgwt app doesn't seem to have any styling working either, even though I'm inheriting from com.smartgwt.SmartGwt.

    Any ideas for how to get the console to use the proper path?

    cheers
    Dan

    #2
    What version / build are you using? Were you able to successfully run the "hello world" sample in the distribution?

    Sanjiv

    Comment


      #3
      1.0b1 (the official release one, not a nightly build).

      I can run things fine in hosted mode, but hello world or my own code run into the same problems with the dev console path within my app. They also both have the same css issue, but I'm working to resolve that.

      Do you know how the smartclient developer console tries to determine the base path it should load from? Perhaps I just need to configure something to point at the right path.

      cheers
      Dan

      Comment


        #4
        Just an update, I figured out something that seems relevant.

        We use struts, therefore although the original gwt app javascript code was located at:
        http://localhost:8080/lusight-webapp/admin/gwt/compiled/com.lusight.gwt.ModelBuilder/com.lusight.gwt.ModelBuilder.nocache.js

        the url displayed in the browser was
        http://localhost:8080/lusight-webapp/admin/modelBuilder.cgi?task=show

        It seems that the app therefore tried to launch the console (or loaded xml, etc.) from the relative path of localhost:8080/lusight-webapp/admin/ instead of localhost:8080/lusight-webapp/admin/gwt/compiled/com.lusight.gwt.ModelBuilder/

        If I take struts out of the equation, and just go straight to an html file at localhost:8080/lusight-webapp/admin/gwt/compiled/com.lusight.gwt.ModelBuilder/ModelBuilder.html , then the css shows, data can be loaded from the correct path, and the console works too.

        I believe that in gwt-ext, which I was playing with last week, the relative path was assumed to be the full localhost:8080/lusight-webapp/admin/gwt/compiled/com.lusight.gwt.ModelBuilder one in both cases, even if the struts url was different.

        Hopefully this will help other people running into similar problems.

        cheers
        Dan

        Comment


          #5
          This doesn't seem like it could be a GWT-Ext vs SmartGWT difference? In both cases a client-side library is only aware of the URL, not the filesystem layout.

          Comment


            #6
            Does SmartGWT use GWT.getModuleBaseURL()?

            When deploying a SmartGWT application (or multiple SmartGWT apps) into an existing (large) web application, it is almost always necessary to deploy the host page(s) in different locations than GWT/SmartGWT files.
            GWT is aware of those conditions and explains the implications in http://code.google.com/docreader/#p=...plicationFiles.
            Hope I did not mess up my deployment or miss something, but it seems that SmartGWT does not make use of GWT.getModuleBaseURL() to reference URL's correctly in such cases.
            Let's have a look at the example for the GWT 1.4 (and higher) bootstrap model and let's assume a servlet delivering the host page is located at
            Code:
            /appContext/appController.form
            and includes the application at:
            Code:
            <script language="JavaScript" src="/appContext/gwt-files/com.company.app.MyApp.nocache.js"></script>
            Then GWT looks for the SmartGWT module at /appContext/gwt-files/sc/...., but SmartGWT tries to locate all static resources (images, css, ...) and the developer console (to get back to the initial issue report) at /appContext/sc/....
            I suppose SmartGWT should prefix all its resources/themes/... with GWT.getModuleBaseURL() to find the proper location in more complex deployment situations.

            Comment


              #7
              Agreed. I'll look into it. The issue with the grails plugin is due to this. Feel free to create an issue.

              Sanjiv

              Comment


                #8
                I created an issue: http://code.google.com/p/smartgwt/issues/detail?id=36

                Comment


                  #9
                  Any update on this ? I have similar problem jsp includes compiled js from different directory, which cause resources not to be found.
                  location of the jsp
                  web/gwt/mydir/PPMManager.jsp

                  location of the js and css files
                  js/gwt/mydir/sc

                  Browser is looking for the
                  /web/gwt/mydir/sc/skins/SilverWave/images/TreeGrid/connector_closed_single.gif


                  Is there a workaround ? May be a way to specify where css files are located in gwt.xml ? Let's say i have 2 different modules. What i have to do in order to have only one copy of */sc resource directory ?

                  Thanks
                  Alided

                  Comment


                    #10
                    Any update on this thread?

                    I am running into the same problem. I can't get the developer console up n running in a large web-app with a small gwt module in it. Basically I am trying to test a webservice wsdl in the developer console. But, it points to http://localhost:8082/BigApp/sc/system/helpers/Log.html and shows a blank screen.

                    Comment


                      #11
                      isomorphic/Sanjiv,

                      Can anyone look at it? I can't get my Dev Console up and running by doing a SC.showConsole().
                      Do I need to do something special to bring up. My folder structure is:

                      BigApp
                      6C4F5DFC4232AF644B01C23580A5133D.gwt.rpc
                      BigApp.html
                      BigApp.html
                      history.html
                      hosted.html
                      ---ds
                      ---images
                      ---sc
                      --system
                      ---helpers
                      --Log.html
                      ---WEBINF
                      ---METAINF

                      regards,

                      Comment


                        #12
                        Could you let me know, what I am doing wrong or missing to not to get the Dev Console up n running from my complete application. It opens up from the Showcase sample.

                        Comment


                          #13
                          Maybe, the notes below will prove useful to someone.

                          Release Notes for Smart GWT 1.3

                          In this release the SmartGwt modules have been slightly refactored so that by default the compile output does not include debug sources, unused resources, developer tools etc. Some users were getting the wrong impression that the size of the compiled output was the size of their application. Most users are probably using either com.smartgwt.SmartGwt or com.smartgwt.SmartGwtNoScript and will be unaffected by this refactoring. You will only notice that the compile output is a lot smaller as it does not include the debug / readable source js files, and the developer console files. The most important change to keep in mind is that in order to use the Developer Console (ie SC.showConsole() ), you will now need to inherit the following module : <inherits name="com.smartgwt.tools.SmartGwtTools"/>

                          Users that happen be using com.smartgwt.SmartGwtDebug will need to inherit com.smartgwt.debug.SmartGwtDebug instead.

                          Comment

                          Working...
                          X