Re: File download and Exception handling using a servlet.

2012-03-14 Thread George Georgovassilis
Hi Albert, The way I did this is by reading SubmitCompleteEvent.getResults(), i.e. uploadForm.addSubmitCompleteHandler(new SubmitCompleteHandler() { public void onSubmitComplete(SubmitCompleteEvent event) { if (event.getResults().contains("SizeException") Window.alert("Data

Re: File download and Exception handling using a servlet.

2012-03-14 Thread dodo dard
Well I found something interesting related to this. Try to look at this. https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/5TePQVFsSfg = www.html5bydemo.com -- You received this message because you are subscribed to the Google Groups "Google Web Toolk

Re: File download and Exception handling using a servlet.

2012-03-14 Thread Albert van Veen
Hi Bowie, I use the code below. The PDF_HOST_URL variable is the url to my local servlet. downloadFrame is a GWT Frame object. pdfService.storeFormInSession(form, new AsyncCallback() { public void onSuccess(EfPdfData arg0) { RootPanel.get().remove(downloadFrame); downloadFrame.setUrl(PDF_HOST_U

Re: File download and Exception handling using a servlet.

2012-03-14 Thread dodo dard
> > Hi Appien > Ho do you call the servlet ? http://www.html5bydemo.com/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolki

Re: File download and Exception handling using a servlet.

2012-03-13 Thread Albert van Veen
Hi Bowie, Im actually interested in how to read the error code or exception when setting an url in a frame object. When the servlet call goes correct correct, the browser shows a file download window. If the servlet call fails, the frontend needs to be aware of this somehow. Do I need somehow rea

Re: File download and Exception handling using a servlet.

2012-03-12 Thread dodo dard
Helo, Well it is a delicate subject to handle. There is no default method to deal with the error result. A way to approach this, is by testing the servlet response. The fastest is to make sure that there is no "ERROR CODE" (404, 503 ...) in resultHtml. But this make your application depends on you

File download and Exception handling using a servlet.

2012-03-12 Thread Appien
Hi guys, In my GWT application the user can download a PDF file by using a servlet. To start the download I create in GWT a hidden Frame Object which calls the servlet. The happy workflow path works great however I want give the user some feedback when generating the PDF file fails. Since the r