Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SmartGWT Datasource customization tutorial

Tags:

gwt

smartgwt

I'm looking for a good tutorial on how to customize a DataSource in SmartGWT (a code sample will also do for now).

Some details:
I have a GWT project which uses a proprietary client-server protocol for fetching data (with an extensive API based on GWT classes). The server is non-GWT based, i.e. GWT is used only for client side.
I'd like to use SmartGWT's widgets with this data by creating a custom DataSource which will interact with the existing GWT infrastructure.

Does anybody know of such a resource?

EDIT:

Charles Kendrick's answer worked for me.

For a working code example, you can see this.

like image 975
adamk Avatar asked Jul 07 '10 11:07

adamk


1 Answers

You do this via overrides of transformRequest and transformResponse - see the documentation of these methods for an overview:

http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/data/DataSource.html#transformRequest(com.smartgwt.client.data.DSRequest)

http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/data/DataSource.html#transformResponse(com.smartgwt.client.data.DSResponse,%20com.smartgwt.client.data.DSRequest,%20java.lang.Object)

like image 180
Charles Kendrick Avatar answered Nov 03 '22 22:11

Charles Kendrick