Announcement

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

    Datasource update by server

    Hello!

    I have extended DataSource with these parameters

    setDataProtocol(DSProtocol.CLIENTCUSTOM);
    setDataFormat(DSDataFormat.CUSTOM);
    setClientOnly(false);

    , like it is in some example in this forum. Everything works fine. Additionaly I'd like to have data updated automaticaly, when data are changed in db. I thought that methods updateCaches(DSResponse dsResponse) and updateCaches(DSResponse dsResponse, DSRequest dsRequest) are created for this purpose. But program never goes there in my case.
    I'd like to ask whether I miss something here (register path to data) or it should be done differently e.g. using messaging framework? Thank you in advance.

    Br, brtnik

    #2
    There is no built-in automatic update of the dataSource from database table changes. You can do this by initiating periodic fetches on a dataSource copy and pushing changes into your dataSource with the updateCaches method. With the messaging component you could have the server determine changes and push them to the client. Then you can update the local dataSource cache as above.

    Comment


      #3
      Thank you for clarification.

      Comment

      Working...
      X