Announcement

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

    Refresh Client Widget upon Server DMI Update

    Is there a mechanism in place such that when a server side DMI class is updated, the client side widget that is bound to this DMI datasource is automatically refreshed with the new data?

    Right now we are sending a comet notification to the client and the client does a fetchData() followed by updateCaches().

    It would be nice if the server could trigger the client side update.

    #2
    See the FAQ on grids not updating for a discussion of automatic cache synchronization. For a server-generated update use updateCaches(). There is no need to also do a fetchData().

    Comment


      #3
      So for server-generated updates, the client will be the one to call updateCaches()?

      We would still need to notify the client to call updateCaches correct? ie. comet message or other server push notification.

      Comment


        #4
        Hi,

        I have a case in which I want to update the ListGrid on my webclient whenever a server side data are updated. My application has multiple user and the changes on the server should immediately reflect on all the clients currently using this application my Database will be updated from two sides i.e. one from the webclient side and another the IPAD user can update records on the same database.

        I am using SmartGwt 2.5 PRO version and SmartClient-8.1(PRO).

        I have done some goggling and found that GWT-comet can be useful.

        Can anyone please suggest me the best suitable way to achieve this and if any sample code is available for how to integrate the same in my existing application Will be very thankful

        Comment


          #5
          SmartGWT Power with the Real-Time Messaging optional module can do server push - see samples in the EE Showcase.

          For any other push system you might use, once you have the data client-side, use DataSource.updateCaches() to notify all components of changes to DataSource records.

          Comment


            #6
            The samples in the showcase are extremely limited. They show a situation where the server is pushing an array of two integers. There's no example of how you would push a collection of Beans and how the client side would tell a listgrid to refresh itself based on the newly pushed data.

            Comment

            Working...
            X