Announcement

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

    SmartGWT 3.1: "_8 is null" in ISC_Grids.js:2020

    Besides the compile errors/warnings after upgrading to 3.1 (2012-12-20) I see errors in list grids. Someone else posted about a similar issue yesterday.

    In GWT dev mode the error is like this

    Code:
    com.google.gwt.core.client.JavaScriptException: (TypeError): Unable to get value of the property 'property': object is null or undefined
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
    In "real" mode this becomes

    Code:
    java.lang.Throwable: (TypeError): _8 is null
     fileName: http://nb0131:8080/esisplus/esisplus/sc/modules/ISC_Grids.js
     stack: isc_ListGrid_setSort@http://nb0131:8080/esisplus/esisplus/sc/modules/ISC_Grids.js:2020
    isc_ListGrid_setData@http://nb0131:8080/esisplus/esisplus/sc/modules/ISC_Grids.js:715
    isc_ListGrid_initWidget@http://nb0131:8080/esisplus/esisplus/sc/modules/ISC_Grids.js:706
    isc_Canvas_init@http://nb0131:8080/esisplus/esisplus/sc/modules/ISC_Core.js:1410
    isc_Class_completeCreation@http://nb0131:8080/esisplus/esisplus/sc/modules/ISC_Core.js:263
    isc_c_Class_create@http://nb0131:8080/esisplus/esisplus/sc/modules/ISC_Core.js:169
    com_smartgwt_client_widgets_grid_ListGrid_create__Lcom_google_gwt_core_client_JavaScriptObject_2@http://nb0131:8080/esisplus/esisplus/07C642ECEA7512B32F33B9FF0850212A.cache.html:40376
    com_smartgwt_client_widgets_BaseWidget_$getOrCreateJsObj__Lcom_smartgwt_client_widgets_BaseWidget_2Lcom_google_gwt_core_client_JavaScriptObject_2@http://nb0131:8080/esisplus/esisplus/07C642ECEA7512B32F33B9FF0850212A.cache.html:31247
    com_smartgwt_client_widgets_BaseWidget_getOrCreateJsObj__Lcom_google_gwt_core_client_JavaScriptObject_2@http://nb0131:8080/esisplus/esisplus/07C642ECEA7512B32F33B9FF0850212A.cache.html:31444
    com_smartgwt_client_widgets_grid_ListGrid_$getCriteria__Lcom_smartgwt_client_widgets_grid_ListGrid_2Lcom_smartgwt_client_data_Criteria_2@http://nb0131:8080/esisplus/esisplus/07C642ECEA7512B32F33B9FF0850212A.cache.html:39594
    esisplus_client_panels_AbstractListPanel_$updateCriteria__Lesisplus_client_panels_AbstractListPanel_2V@http://nb0131:8080/esisplus/esisplus/07C642ECEA7512B32F33B9FF0850212A.cache.html:38545
    When I check what we do at AbstractListPanel#updateCriteria() I see nothing daft

    Code:
    protected void updateCriteria() {
      Criteria criteria = getListGrid().getCriteria();
      if (criteria == null) {
        criteria = new Criterion();
      }
      updateCustomCriteria(criteria);
      getListGrid().setCriteria(criteria);
    }
    Using the debugger I found out that the first line fails when calling getCriteria().

    #2
    Did you see the resolution today in that other thread? Bad array of sort specifiers. Most likely you have the same issue.

    Comment


      #3
      Originally posted by Isomorphic View Post
      Most likely you have the same issue.
      Yep, indeed. We had it with ListGrid#setInitialSort(), though.

      Comment


        #4
        Same ultimate codepath. Note, as we mentioned in the other thread, we've made it so that the code will ignore null slots in a SortSpecifier array now, so it works even with invalid inputs now.

        Comment


          #5
          Originally posted by Isomorphic View Post
          it works even with invalid inputs now
          I like defensively programmed frameworks but as you said it's bad usage to pass arrays with trailing nulls so I fixed our code nonetheless.

          Now, if we knew how to proceed with the compile errors/warnings after upgrading to 3.1 we could alter our CSS to work with 3.1 and roll a new RC of our application.

          Comment

          Working...
          X