Announcement

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

    ListGrid export no longer works.

    We recently upgraded to SmartClient 8.0 and have discovered that a listgrid export which used to work no longer works. We have replicated the failure in IE, FF, and Chrome.

    The existing code uses RPCManager.sendRequest() via “hiddenFrame” from the client side and the server side returns a CVS delimited set of data along with the necessary http headers identifying the data as a file/attachment. The problem is that the dialog for saving the file no longer appears. I have dug through the developer console logs and I see an error about the transport attribute. (see below)

    I have tried setting the RPCRequest parms for downloadResult and downloadToFile to true without success. I have also removed the transport attribute with no success.

    I know that with SmartClient 8.0 there are new methods exportData and exportClientData which my understanding is that these only work by enabling smartclient Server.

    How can I get my file export to work again?


    Code:
    RPCManager.sendRequest({
        transport: "hiddenFrame",
        defaultTimeout: 1,
        willHandleError: true,
        params: isc.addProperties(
            {}, 
            grid.data.getCriteria(), 
            {   OPERATION_TYPE: "fetch", 
                OUTPUT_FORMAT: "CSV", 
                SESSION_ID: isc.applicationWindow.loginData.session_id, 
                START: 0, 
                END: 99999}
            ),
        actionURL: grid.dataSource.dataURL,
        showPrompt: false
    });
    logging with: transport: "hiddenFrame",
    14:26:52.869:RDQ6:DEBUG:ListGrid:isc_ListGrid_0:delaying adjustOverflow: childResized
    14:26:56.475:MUP4:INFO:RPCManager:sendQueue[10]: 1 RPCRequest(s); transport: hiddenFrame; target: cmr_server.php?om=NonServicedLocations.dataSourceOperations&isc_rpc=1&isc_v=SC_SNAPSHOT-2011-01-06&isc_tnum=10
    14:26:56.477:MUP4:WARN:RPCManager:Attempt to send transaction with specified transport 'hiddenFrame' failed - unsupported transaction type.

    logging without: transport: "hiddenFrame",
    14:28:56.293:RDQ0:DEBUG:ListGrid:isc_ListGrid_0:delaying adjustOverflow: childResized
    14:28:56.969:MUP4:INFO:RPCManager:sendQueue[11]: 1 RPCRequest(s); transport: xmlHttpRequest; target: cmr_server.php?om=NonServicedLocations.dataSourceOperations&isc_rpc=1&isc_v=SC_SNAPSHOT-2011-01-06&isc_xhr=1&isc_tnum=11
    14:28:56.971:MUP4:DEBUG:RPCManager:XMLHttpRequest POST to cmr_server.php?om=NonServicedLocations.dataSourceOperations&isc_rpc=1&isc_v=SC_SNAPSHOT-2011-01-06&isc_xhr=1&isc_tnum=11 contentType: application/x-www-form-urlencoded; charset=UTF-8 with body -->CUSTOMER_NAME=oo&OPERATION_TYPE=fetch&OUTPUT_FORMAT=CSV&SESSION_ID=262723&START=0&END=99999<--
    14:28:57.206:XRP4:INFO:RPCManager:transaction 11 arrived after 235ms
    14:28:57.206:XRP4:DEBUG:RPCManager:Result string for transaction 11: [result data removed]

    #2
    This would happen if you were using the LGPL libraries, since the "hiddenFrame" transport only works with the SmartClient Java Server (or at any rate, you'd have to use internals to make it work with something else).

    Is this your situation?

    Why are you using "hiddenFrame" comm in this case?

    Comment


      #3
      We are indeed using the LGPL libraries. This is legacy code which did work at one time.

      We do not use the SmartClient Server. What is the best/easiest way to get it working again.

      Comment


        #4
        Why are you using "hiddenFrame"?

        How did you get "hiddenFrame" mode working at all, are you using internal APIs to do so? They may have changed (as internal APIs do :)

        Comment


          #5
          We upgraded from 6.51 Intranet to 8.0 LGPL. I do not know that the internal APIs are that you are speaking of. Do you mean internal APIs of our own? No we are not using anything like that for this. Just the few lines of code I posted.

          The code posted before had not been modified since before I was hired so I don't know what the assumptions were back then.

          I assume that the old code just won't work with the new libraries. What's the right way to recode the export assuming that we don't have SmartClient Server?

          Comment


            #6
            This is getting a little odd - this is the third time we're asking why you would use "hiddenFrame" at all. Once again, it's not a supported API for LGPL, it would have required some hacks to use internal APIs to make it work, and as far as we can tell, you're telling us everything is fine if you do not use "hiddenFrame".

            Comment


              #7
              As already stated, this is legacy code that I didn't write. It worked with SmartClient 6.5.1, but now does not work with 8.0.

              I cannot comment on the motivation of the developer that originally wrote this code, but my assumption is that the "hiddenFrame" transport method allows the browser to receive/interpret the result of the request. That would make sense in this case as what is returned is (essentially) a file with appropriate headers to trigger the browser to prompt the user to save/open - which is exactly the functionality desired.

              If the hiddenFrame transport method is not supported in SmartClient 8.0 LGPL, then what alternate method can I use to send a request, receive a file, and have the browser prompt for save/open? Without using SmartClient Server.

              Comment

              Working...
              X