Announcement

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

    ListGrid exportClientData causing exception

    We are using version SNAPSHOT_v9.1d_2013-11-30/Enterprise Deployment (built 2013-11-30) with IE9.

    When calling the exportClientData on ListGrid with showGroupSummary and showGridSummary enabled we receive the following exception:

    Code:
    14:00:38.351 [ERROR] [com.pci.gp.GP] Uncaught exception escaped
    com.google.gwt.dev.shell.HostedModeException: invoke arguments: JS value of type undefined, expected int
        at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266)
        at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
        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:242)
        at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at com.smartgwt.client.widgets.grid.ListGrid.exportClientData(ListGrid.java)
        at com.pci.gp.client.screens.allocations.AllocationManagement$15.execute(AllocationManagement.java:647)
        at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
        at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:180)
        at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:347)
        at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
        at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
        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:242)
        at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Thread.java:724)

    #2
    We were not able to reproduce the issue with the following. Can you please provide us some additional accompanied with an test case so we can reproduce the issue.

    Thank you.

    Code:
    		final ListGrid listGrid = new ListGrid(DataSource.get("supplyItem"));
    listGrid.setAutoFetchData(true);
    listGrid.setShowGroupSummary(true);
    listGrid.setShowGridSummary(true);
    listGrid.draw();
    
    Button button = new Button("hi");
    button.setLeft(300);
    button.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
    	@Override
    	public void onClick(ClickEvent event) {
    		listGrid.exportData();
    	}
    });
    button.draw();

    Comment


      #3
      I'm using exportClientData out to an Excel Spreadsheet - not exportData:
      Code:
      DSRequest dsRequestProperties = new DSRequest();
      dsRequestProperties.setExportAs(ExportFormat.OOXML);
      dsRequestProperties.setExportFilename("Allocation_" + allocation.getValueAsString() + ".xlsx");
      dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD);
      
      grid.exportClientData(dsRequestProperties);
      I did debug the javascript side and found the problem here:

      ISC_Core.js on line 70709 is calling this.getReportExportObject for the summary rows.

      Code:
      exportObject = this.getRecordExportObject(record, fields, allowedProperties,
                          includeHiddenFields, includeCollapsedNodes, alwaysExportExpandedStyles,
                          exportDatesAsFormattedString)
                  ;
      as you can see it is passing 7 parameters to the method, except the method actual takes 10 parameters

      Code:
      getRecordExportObject : function (record, fields, allowedProperties, includeHiddenFields,
          includeCollapsedNodes, alwaysExportExpandedStyles, exportValueFields, exportFieldsSpecified,
          exportDatesAsFormattedString, rowNum)
      on line 70792 of the above method it passes the parameter rowNum into the addDetailExportFieldValue, but it's not being sent in the call. So on line 70364 when the method getExportBGColor is called an exception is generated from that call.

      Code:
              this.addDetailedExportFieldValue(exportObject, styleProp, record, field, fieldNum,
                  allowedProperties, alwaysExportExpandedStyles, exportDatesAsFormattedString,
                  rowNum);

      Comment


        #4
        We've made a change to address this issue.
        Please try the next nightly 4.1d build, dated Dec 10 or above.

        Thanks
        Isomorphic Software

        Comment

        Working...
        X