Announcement

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

    listgrid.exportclientdata throws null exception

    Hello.
    (running smartgwt pro 3.1)

    Not sure why this is happening, but when i try and export a grouped listgrid through exportclientdata, i get a null exception thrown back up! I'm at a loss, so pointers would be appreciated.

    code, nothing complicated:
    Code:
    public void print() {
            Tree tree = reportGrid.getGroupTree();
            TreeNode[] allNodes = (tree != null ? tree.getChildren(tree.getRoot()) : null);
            if (tree != null && allNodes != null && allNodes.length > 0) {
                tree.closeAll();
                tree.openAll();
                DSRequest dsRequestProperties = new DSRequest();
                dsRequestProperties.setExportAs(ExportFormat.OOXML);
                dsRequestProperties.setWillHandleError(true);
                dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD);
                dsRequestProperties.setAttribute("exportFilename", fileNameCreator.createReportName());
                dsRequestProperties.setExportFields(reportFields);
                dsRequestProperties.setExportDelimiter(";");
                reportGrid.exportClientData(dsRequestProperties);
            } else {
                SC.say(MyCommonConstants.constants.reportWarningNoData());
            }

    exception thrown:
    Code:
    Uncaught exception: com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
        at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:71)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
        at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
        at java.lang.Thread.run(Thread.java:680)
    Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): _18 is null
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at com.smartgwt.client.widgets.grid.ListGrid.exportClientData(ListGrid.java)
        at XXXX.MyTreeGridExportEventHandler.print(MyTreeGridExportEventHandler.java:56)
    Last edited by mathias; 6 Mar 2013, 14:21.

    #2
    Update. I see this also:

    Uncaught JavaScript exception [_18 is null] in http://127.0.0.1:8888/nuba/sc/modules/ISC_Core.js, line 2585


    Would be great with some input. I can point out that it's a grouped grid as can be seen in the code.

    Comment


      #3
      Start by making sure you are using the latest patched build, and reporting your full version, then use the instruction in the FAQ to get a stack trace for the JS error.

      Comment

      Working...
      X