Announcement

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

    Multiple DynamicForm synchronization

    Hi,

    I have a few DynamicForm objects on a screen (one is currently visible, while others aren't). All of the
    forms are associated to the same DataSource ID reference and they all show the same record.

    When data gets updated and saved within the currently visible form, is there any built-in synchronization
    mechanisms to have all other forms synchronized with the updated data?

    I did notice that the ListGrid does have automatic synchronizing of data when such change occur, but I
    was looking for something similar across dynamic forms when data gets updated inside another form ...

    Is there anything built-in ? If not, what would be the simplest approach that you'd suggest to achieve this ?

    Thanks,

    #2
    Use a ValuesManager.

    Comment


      #3
      That is actually good advice, as the response from the server from a successful save via a ValuesManager will populate all member forms with the data-as-saved.

      However if you're looking for a completely general solution for watching for updates, a trick is to create a ResultSet that uses the DataSource, and implement or observe() it's dataChanged method. Just be careful to check form.valuesHaveChanged() to avoid overwriting user edits.

      Comment


        #4
        I'll look into both approaches. Thanks guys!

        Comment

        Working...
        X