Announcement

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

    Help debugging javascript error

    SmartClient Version: SC_SNAPSHOT-2011-08-02/PowerEdition Deployment (built 2011-08-02)

    I'm running into a problem with some new code and can't seem to find enough information to know what is causing it. When running in development mode the Eclipse Console view shows this error.

    Uncaught JavaScript exception [_3.fields is undefined] in http://127.0.0.1:8888/ipgui/sc/modules/ISC_Grids.js?isc_version=7.0.js, line 2631

    The closest thing I can find in the SmartClient dev console is this warning.

    10:00:07.283:XRP6:WARN:PickListMenu:isc_PickListMenu_1:fields and completeFields are null and there is no DataSource.

    The SelectItem that is isc_PickListMenu_1 does have both an optionDataSource set and both display and value fields. I'm not sure this has anything to do with the _3 error since when this same class is used in a different context I don't get the error.

    Any help identifying what is causing the reference to "_3.fields" would be greatly appreciated.

    #2
    P.S. - In posting that error message I noticed the isc_version=7.0 and was wondering if, after upgrading to the 2.5 release of SmartGWT I should change my script tags in index.html to version 8.0?

    <script src=ipgui/sc/modules/ISC_Grids.js?isc_version=7.0.js></script>

    Comment


      #3
      Can you show the rest of the stack trace? Should point right to the problem.

      Comment


        #4
        Thanks for the quick reply. I found the problem. I have code that dynamically sets grid header spans when the grid is created. In some scenarios I was creating an empty array and passing that to ListGrid.setHeaderSpans() which resulted in the js error when the grid was drawn.

        But just out of curiosity, what about the isc_version=7.0.js? Should it now be 8.0? It doesn't seem to cause any problem leaving it at 7.0.

        Comment


          #5
          Those are probably copied from a JSP somewhere, which usually writes them out dynamically to prevent cross-version caching, so since youve got them as static script tags, you should really just remove them.

          Comment

          Working...
          X