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?
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]
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 });
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]
Comment