Announcement

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

    TypeError when calling CubeGrid.exportClientData()

    I'm getting a JavaScript TypeError when calling exportClientData() on a CubeGrid object. The message is: "_2 is undefined". I verified this being a problem of SmartGWT by creating a new Power/EE showcase example which is attached. A simple workaround is to supply a (dummy) DSRequest object as argument. It occurs both in development mode and when compiled.

    SmartGWT/Client version: v8.2p_2012-06-12/PowerEdition Deployment

    Internet Explorer 6 stack trace:
    Code:
    16:04:09.965:MUP7:WARN:Log:Error:
    	''$90b' is leeg of geen object'
    	in http://10.0.2.2:8888/index.html?gwt.codesvr=10.0.2.2:9997
    	at line 3940
        Canvas.exportClientDataReply(_1=>Array[3], _2=>undef)
        callback(data=>Array[3], context=>undef)
            "isc_CubeGrid_0.exportClientDataReply(data,context)"
        [c]Class.fireCallback(_1=>"isc_CubeGrid_0.exportClientDataReply(dat..."[50], _2=>"data,context", _3=>Array[2], _4=>[CubeGrid ID:isc_CubeGrid_0], _5=>undef) on [Class CubeGrid]
        Class.fireCallback(_1=>"isc_CubeGrid_0.exportClientDataReply(dat..."[50], _2=>"data,context", _3=>Array[2], _4=>undef)
        CubeGrid.getClientExportDataChunk(_1=>Obj)
        CubeGrid.getClientExportData(_1=>undef, _2=>"isc_CubeGrid_0.exportClientDataReply(dat..."[50])
        Canvas.exportClientData(_1=>undef, _2=>undef)
        StatefulCanvas.handleActivate(_1=>Obj, _2=>undef)
        StatefulCanvas.handleClick(_1=>Obj, _2=>undef)
        [c]EventHandler.bubbleEvent(_1=>[IButton ID:isc_IButton_1], _2=>"click", _3=>undef, _4=>undef)
        [c]EventHandler.handleClick(_1=>[IButton ID:isc_IButton_1], _2=>undef)
        [c]EventHandler.$k5(_1=>Obj{type:error}, _2=>undef)
        [c]EventHandler.handleMouseUp(_1=>Obj{type:error}, _2=>undef)
        [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>Obj{type:error})
        anonymous(event=>undef)
            "if (!isc.Browser.isIE && event == null) return;var returnVal=arguments.callee.$ch.isc.EH.dispatch(arguments.callee.$j2,event);return returnVal;"
    Attached Files

    #2
    This component doesn't support exportClientData() - it would be very complicated to get any kind of WYSIWYG display of a CubeGrid in Excel, and basically not possible in CSV.

    This is something you could sponsor if you need it; otherwise, you can get a non-WYSIWYG export of the data shown in the cube (just as a flat record set) via DataSource.exportData().

    Comment


      #3
      In that case, wouldn't it be better to have CubeGrid's exportClientData() method log a message about that they can't be used for CubeGrids?

      Nevertheless, this method does create flat representations of the cube (just the cells displayed as they are). And in this context, I find it strange that exportClientData() fails with a TypeError whereas exportClientData(new DSRequest()) works as expected. You are correct in that one cannot change facets or expand hierarchical facet values after export but that was never my aim.

      Comment


        #4
        You're right that the basics should be working, and we've made a change to avoid the error you were seeing if no request properties were passed in. This will hit nightlies over the next week or so, in the meantime a dummy dsRequest is fine.

        We will also be explicitly calling this method out as being technically "unsupported" in the docs - it is basically functional but not extensively tested and has various limitations.

        Comment

        Working...
        X