Announcement

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

    Creating a Datasource for Server-side updates

    Hello,
    I am new to SmartGWT/SmartClient. I want to use the ListGrids with a DataSource that hooks up to any URL etc that is updatable at the backend/server-side. I went over the SmartGWT Showcase, but could not find an example that does that specifically. In the documentation, its mentioned that the SmartGWT Server accomplishes this, but I could not find any example that does not use the SmartGWT server and yet has updateable datasources.

    I did read about using a RESTDataSource and the transformResponse() methods, but it didnt fit together nicely in one post.

    Can someone please redirect me any thread on this forum/blog etc where this kind of updateable datasource implementations are discussed. Our backend is a typical webapp and I can develop any interface that is required.

    #2
    If you are using the SmartGWT server framework, just use a SQL dataSource and it is automatically updatable - no coding necessary.

    Comment


      #3
      We are not using the SmartGWT EE server. Without this option, how do we achieve the back-end server update using RESTDataSource. If there is any example to show that, that would be great.

      Comment


        #4
        If your using the RestDataSource, you can either set a seperate URL for each type of operation (fetch, add, update, remove) or a single url that will handle any operation. The url is nothing more then your servlet which can handle the operations via whateve (jdbc, etc..) And there is an example http://www.smartclient.com/smartgwt/showcase/#featured_restfulds which shows you how server responses should be constructed and how to construct a rest data source to begin with, probably best to start with the example, then chnage it to use your servlet instead of test xml data.

        Comment

        Working...
        X