Tuesday, July 30, 2013

Re: only RPC call completes rest of my code should execute - how should I do it - very urgent please

If I understand you correctly, your app sends instructions to the server to create a CSV which you then wish to retrieve.

If the CSV is small, you could always use GWT RPC and return it as a string to your app. However if you want to return it as a file so the browser can, say, open it in a spreadsheet app, you can follow this generic description for file creation and downloading:

https://groups.google.com/d/msg/google-web-toolkit/nZsQYKTLxH0/SVVGJIusog8J

I use this technique for many sorts of files, usually directing the servlet to an IFRAME so I don't get an unwanted new tab or, worse, blow away my GWT app with a new URL.

On Monday, July 29, 2013 6:00:33 PM UTC-4, fedex wrote:
Hi everyone,

I have an interface where the user selects the values and upon clicking the download button the selected values runs in the sql query and the obtained data is written to csv file. 

I am doing an RPC call to send the user selected values from the interface to the server. And on the server side I am storing these values in the http session variable. And I am retrieving these values in the servlet class which has a funtionality to write a data to csv file. Because the values send to the server is a RPC call, my initial session value remains zero ( first download click) and it writes nothing to the csv file though i have selected values from the user. On second click of download button it writes the data of the first selected values. How can expedite the RPC call or how can I make a RPC to synchronize call ? Can someone please suggest a possible to overcome this? Thanks a lot in advance 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment