Announcement

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

    getClientOnlyDataSource

    I am using getClientOnlyDataSource to get a clientOnly version of one of my datasources and that works fine, but I don't understand how the response from the fetch operation is used.

    Can you explain this in a little more detail?

    The JavaDoc says :
    "Produces a clientOnly "copy" of a particular subset of data from a normal DataSource, via calling fetchData() to fetch matching rows, and constructing a clientOnly DataSource that inheritsFrom the original DataSource."

    Does it mean that I can return the initial data for my listgrid in the fetch operation associated with getClientOnlyDataSource, and if so, how do I get to the data? The ClientOnlyDataSourceCallback only gives me the new datasource, but not the fetch response. Or am I missing something completely?

    #2
    The returned DataSource is a DataSource which is used like any other DataSource.

    You can call fetchData() on it and get data in the callback.

    You can bind a ListGrid to it and call fetchData() on the ListGrid to cause it to fetch data from the DataSource.

    Comment


      #3
      I'm not sure you understood my question.

      When calling getClientOnlyDataSource a fetch operation is made on the original datasource.

      From reading http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/docs/ClientOnlyDataSources.html it seems that I should be able to use this fetch operation to return the initial data for my grid, correct me if I'm wrong.

      My question is: How do I access the data returned in the fetch operation made by getClientOnlyDataSource?

      Comment


        #4
        The returned clientOnly DataSource *contains* the data fetched from the original DataSource, and you can access it that data in the ways we just described.

        If this isn't clear, take a step back and describe what you are trying to accomplish, because it seems like your expecting this API to do something other than what it says it does..

        Comment

        Working...
        X