Announcement

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

    validation errors with implicitSave and ValuesManager

    Hi, when using implicitSave on a set of DynamicForms managed by a ValuesManager, is there a way to be notified if there are any validation errors?
    That way I could highlight that some errors exist on a form that might not be visible.

    #2
    I was forgetting that I probably just need to implement handleHiddenValidationErrors. I see that it’s available both on forms and on ValuesManagers, and I don’t see any reason why it shouldn’t work with implicitSave.

    Comment


      #3
      Actually, it turns out it doesn’t work in my case. Maybe because I have forms that are out of view, but form.isVisible() still returns true.
      So I tried observing ValuesManager.saveData(), and that does seem to work. Let me know if you have a better suggestion.

      Comment


        #4
        In this context, "hidden validation errors" means errors that occur on FormItems that are not currently visible, or where there is no FormItem at all.

        Although it's dubious to have the form hidden before the save completes (since, just from a UX perspective, you'd presumably have to jerk them back to the hidden form to show them the errors!), the firing of the handleHiddenValidationErrors() handler is not intended to be dependent on whether the form isVisible() at that moment.

        Comment

        Working...
        X