Announcement

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

    ListGrid data export is not working

    Hi there,

    Another problem I have is that, following the showcase, the excel export is not working.
    I've written this simple code :
    Code:
    xlsExport.addClickHandler(new ClickHandler() {
    	public void onClick(ClickEvent arg0) {
    		DSRequest dsRequestProperties = new DSRequest();
    		dsRequestProperties.setExportAs(ExportFormat.XLS);
    		dsRequestProperties.setExportDisplay(ExportDisplay.WINDOW);
    		listGrid.exportData(dsRequestProperties);
    	}
    });
    I'm using the smart GWT EE demo, as I'm trying some functionnalities in order to purchase it...

    I hope finding some support

    thanks

    #2
    You need to post more information - see the FAQ for the most relevant information.

    Comment


      #3
      I just tryied to get some more informations

      When I click on the button, this exception is trown:
      Code:
      com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot set property 'download_filename' of null  
      stack: TypeError: Cannot set property 'download_filename' of null
           at Object.isc_DataSource_exportData [as exportData] (http://127.0.0.1:8888/com.alea.Alea/sc/modules/ISC_DataBinding.js:549:60)
           at Object.isc_Canvas_exportData [as exportData] (http://127.0.0.1:8888/com.alea.Alea/sc/modules/ISC_Core.js:3254:22)
           at [object Object].<anonymous> (unknown source)
           at __gwt_jsInvoke (http://127.0.0.1:8888/com.alea.Alea/hosted.html?com_alea_Alea:70:35)
           at eval at <anonymous> (http://127.0.0.1:8888/com.alea.Alea/hosted.html?com_alea_Alea:54:12)
           at HTMLButtonElement.<anonymous> (unknown source)
           at unknown source
           at __gwt_jsInvoke (http://127.0.0.1:8888/com.alea.Alea/hosted.html?com_alea_Alea:70:35)
           at eval at <anonymous> (http://127.0.0.1:8888/com.alea.Alea/hosted.html?com_alea_Alea:54:12)
           at HTMLButtonElement.<anonymous> (unknown source)
      	 type: non_object_property_store  arguments: download_filename,  __gwt_ObjectId: 2542
      	 
      at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
      at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
      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:188)
      at sun.reflect.GeneratedMethodAccessor24.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:157)
      at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
      at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
      at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
      at java.lang.Thread.run(Thread.java:619)
      Last edited by romain.vdk; 7 Jul 2010, 01:27.

      Comment


        #4
        Still no idea ?

        Since we got the Pro version, ExportFormat.XLS has disappeared. I only have the CSV option, but the product info says that XLS is in the Pro ... Is that somewhere else?

        Comment


          #5
          These both sound like same kind of botched installation. Start over and really follow all of the steps, and you may as well start with 2.3 since it's out. Once you see the XLS option appearance again in the docs, retry your export code.

          Comment


            #6
            Could you point me the URL where the correct install readme is? I didn't found it in the FAQ nor in the Docs so I guessed that inculdes all depedencies in my pom.xml is good enough

            Code:
            <!-- Smart GWT -->
            		<dependency>
            			<groupId>com.isomorphic</groupId>
            			<artifactId>isomorphic_core_rpc</artifactId>
            			<version>2.1</version>
            		</dependency>
            		<dependency>
            			<groupId>com.isomorphic</groupId>
            			<artifactId>isomorphic_tools</artifactId>
            			<version>2.1</version>
            		</dependency>
            		<dependency>
            			<groupId>com.isomorphic</groupId>
            			<artifactId>isomorphic_sql</artifactId>
            			<version>2.1</version>
            		</dependency>
            		<dependency>
            			<groupId>com.smartgwt</groupId>
            			<artifactId>smartgwt</artifactId>
            			<version>2.1</version>
            		</dependency>
            		<dependency>
            			<groupId>com.smartgwt</groupId>
            			<artifactId>smartgwt-skins</artifactId>
            			<version>2.2</version>
            		</dependency>
            		<dependency>
            			<groupId>com.smartgwt</groupId>
            			<artifactId>smartgwtpro</artifactId>
            			<version>2.1</version>
            		</dependency>

            Comment


              #7
              It's right here.

              Comment


                #8
                thanks for that, I'm looking at it.

                Comment


                  #9
                  I remade the whole installation. It's not working yet, but it's better than before.

                  Now, the url generated for the export is the following : http://127.0.0.1:8888/transport/getTransports.xml/Results.csv/Results.csv?ituCode=%2540400%25&download_filename=Results.csv&_operationType=fetch&_textMatchStyle=exact&_dataSource=transportResult&_transaction=%3Ctransaction+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22+xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum+xsi%3Atype%3D%22xsd%3Along%22%3E3%3C%2FtransactionNum%3E%3Coperations+xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%3E__ISC_NULL__%3C%2Felem%3E%3C%2Foperations%3E%3Cjscallback%3Eparent.isc.Comm.hiddenFrameReply%283%2Cresults%29%3C%2Fjscallback%3E%3C%2Ftransaction%3E&protocolVersion=1.0&__iframeTarget__=Results.csv

                  Do you see the problem ? That mades me a 404 error ...

                  Comment


                    #10
                    Looks like you've got a custom replacement for IDACall, which is fine, but like IDACall, you need to register it for all URLs underneath it (IDACall/*) in web.xml.

                    Comment


                      #11
                      I'm sorry I don't understand.
                      It's the first time I hear about "IDACall" and I don't even know how I changed it ... The only thing I made is to write this : this.setDataURL("/transport/getTransports.xml"); in my datasource to set the proper XML source file. I suppose now you say that, that it also changes the "IDACall" you speak about.

                      All right, what have I to change in my web.xml ? I joint it to my post so you can see by yourself what's in it, because I've no idea what to do...
                      Attached Files

                      Comment


                        #12
                        There are two types of export - client export and server export.

                        You are apparently trying to use server export with a flat XML file, but it only works when you have done server-side data integration (you have a .ds.xml file and are using built-in connectors like SQL or Hibernate or have written your own logic).

                        You can still use client export in this circumstance - make sure you are working with 2.3, and look at the APIs for exportClientData().

                        Comment

                        Working...
                        X