Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1048

Form Binding and binding validationMessages to components' errorMessage (error popup)

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: Freshly
    • Fix Version/s: 6.5.2
    • Component/s: Components, Databind 2
    • Labels:
    • Environment:

      6.0.1-FL-2012041222
      Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 (problem is not platform specific)

      Description

      This feature request is based on discussion in ZK-863.
      If you use form binding and validation only on form level and not on component level, it could happen that the form validator create multiple validation error messages.
      If you use the ZK5 error popup by binding to component's errorMessage attribute, you will get multiple error popups (which is desired).
      The problem is that editing all erroneous input fields won't make the popups go away since the validation is only done on form level, e.g. by pressing the submit button and not by the onChange event of each input field (like ZK5 constraints work).

      To illustrate the problem, just try the attached sample:

      • open page
      • do NOT edit any input fields, but press immediately "Save" button
      • all input fields show an error popup
        Now try to edit the input fields to fix the validation problems.
        For an "end user" it is almost impossible to get out of this situation.

      How can this be solved? Frankly, I do not have an answer.
      One way could be to trigger the form validation also on editing of single fields. This would make the popups disappear - one after each other.
      But maybe you have a better idea.

        Attachments

        1. formbinding.zul
          0.8 kB
        2. Person.java
          0.5 kB
        3. ViewModel.java
          1 kB

          Activity

            People

            • Assignee:
              dennis dennis
              Reporter:
              Matze2 Matze2
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: