Announcement

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

    Recommended approach with Smart GWT EE for calling other servlets from the client

    I'm currently evaluating Smart GWT EE and I had a few questions.

    Using the Smart GWT EE what would your recommended approach be for passing a com.smartgwt.client.data.Record from the client to a Servlet and then quering some additional records on the server side for generating a PDF be?

    eg. on a button click in a ListGrid I want to generate a PDF on the server and then return the URL for the PDF to the client

    On the client side should I be passing the Record using a RPCRequest or is there a better method?

    On the server side should I be querying additional records using this method?
    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/StandaloneDataSourceUsage.html

    #2
    See the QuickStart Guide sections on DMI, it discusses doing additional DataSource operations inside of a DMI.

    You should set operationType:"custom" for the PDF export and call it via DataSource.performCustomOperation(). Use RPCManager.doCustomResponse() to suppress the normal response so you can directly write to the servlet outputStream. Client-side, set dsRequest.downloadResult (inherited from rpcRequest) to indicate that you expect the result to be a download.

    Comment

    Working...
    X