Announcement

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

    DynamicForm update on DataSource cache update

    Hello,

    I have a simple test case where a DynamicForm does not get updated when the cache of the DataSource that is attached to it gets updated... By pressing the "Update cache" button the ListGrid gets updated but the form is not. Is this a bug or am I missing something?

    Test case attached. Using SmartClient Version: v13.0p_2022-01-09/LGPL Development Only (built 2022-01-09)

    Thank you



    Attached Files

    #2
    It looks like you've probably found a bug here (or two). Until we get it fixed, you can get around this by:

    1. using a call to editRecord() after using fetchData() (possibly just switch to calling DataSource.fetchData() and using the callback to call dynamicForm.editRecord()).

    2. only update one record at a time via updateCaches()

    Comment


      #3
      Point 2 solves the problem.
      Point 1 solves the problem but not if it is called within the onDraw() method. Although the form is visually filled with the correct record the updates are not performed.

      Later edit: Actually I think it is not even needed Point 1 because a simple fetchData(criteria) works just fine when selecting a record within the ListGrid. The only problem is related with calling the fetch within the onDraw().
      Last edited by slick07; 24 Mar 2022, 00:34. Reason: After some more testing

      Comment


        #4
        OK, that's great, that might help to narrow down the specific bug we need to correct. It sounds like you may have already prepared an alternate version of your test case that narrows things down, if so, can you share it? It could help correct the bug(s) more quickly.

        Comment


          #5
          Sure. Find it attached. One more strange thing that I notice is that as long as the selection is kept within the ListGrid the update works on the form. But if you clear the selection on the ListGrid the update on the form stops working... And this takes me to the conclusion that the update on the form actually never works and what really happens is that the selection on the ListGrid gets updated on each cache update and hence a new fetch is triggered on the form. So on the form it is actually an indirect refetch (due to the selection change of the grid) instead of a direct update due to the updateCache().
          Attached Files

          Comment


            #6
            Hi Isomorphic , Do you think you can take a look at the last test case for this bug? As we are expanding the use of DynamicForms we can no longer use the workaround you provided.

            Comment


              #7

              Hello again

              We believe the framework issue here is already resolved. Please try the latest nightly build from 13.0 and let us know if you continue to see any unexpected behavior


              Thanks and Regards

              Isomorphic Software

              Comment


                #8
                I confirm the issue is fixed. Thank you!

                Comment

                Working...
                X