There are two ways of how to do it:
1.) Using RequestBuilder you could generate a AJAX call to your Servlet (as you did it). However in the callback method of the RequestBuilder you will get the response from the servlet (probably the PDF binary data) and then you could use that to open a new window with the binary PDF data.
however I think the easier approach is the following:
2.) Have either a form or a URL which points to the URL of the servlet responsible for generating the PDF. The data you want to pass to the servlet can bei either passed by POST (form) or GET (url) and in the servlet make sure that response headers are set properly (application/PDF).
second appraoch is easier.
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-toolkit/-/YleAom9t2JQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment