Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3793

Explore notification of validation errors in composite fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: 5.4.4
    • Fix Version/s: 5.4.6
    • Component/s: dialogs
    • Labels:
    • Sprint:
      Basel 39
    • Story Points:
      5
    • Magnolia Release:
      5.4.6

      Description

      Description

      When validation of a field placed inside a composite field fails notifications are not working correctly.

      Use-case 1 - field with validator configured under composite field:

      • when validation fails dialog is not saved and displays the generic error on top but user is not notified at concrete field with the specific error message.

      Use-case 2 - required field without validator configured under composite field:

      • correct message is displayed ("This field is required.") but is tied to the composite field, not the concrete inner field.

      Use-case 3 - required field with validator configured under composite field:

      • if the field was blank before and validation failed, error message for required field missing ("This field is required.") is displayed. Same as in use-case 2 it's tied to whole composite field.
      • if the field was not blank the same behavior as in use-case 1 will occur.

      Correct behavior - error messages should be displayed under concrete fields and not be covered by required files missing message.

      Use-case 4 - making changes on the select field (which is part of composite field) caused the below exception
      See more in video: https://jira.magnolia-cms.com/secure/attachment/32694/SelectFieldValidation.webm

      2016-03-17 10:59:08,524 ERROR .magnolia.ui.admincentral.AdmincentralErrorHandler: AdmincentralUI has encountered an unhandled exception.
      com.vaadin.data.Validator$InvalidValueException: Country is required
      at com.vaadin.data.validator.AbstractValidator.validate(AbstractValidator.java:103)
      at com.vaadin.ui.AbstractField.validate(AbstractField.java:969)
      at com.vaadin.ui.AbstractField.setValue(AbstractField.java:499)
      at com.vaadin.ui.AbstractSelect.setValue(AbstractSelect.java:709)
      at com.vaadin.ui.ComboBox.changeVariables(ComboBox.java:674)
      at com.vaadin.server.communication.ServerRpcHandler.changeVariables(ServerRpcHandler.java:486)
      at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:305)
      at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:184)
      at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:92)
      at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
      at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
      at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:350)
      at info.magnolia.ui.admincentral.AdmincentralVaadinServlet.service(AdmincentralVaadinServlet.java:131)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      at info.magnolia.cms.filters.ServletDispatchingFilter.doFilter(ServletDispatchingFilter.java:148)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)

      Included file contains simple composite field configuration.

        Attachments

        1. case1.png
          30 kB
          Ilgun Ilgun
        2. case1-supp.png
          33 kB
          Ilgun Ilgun
        3. case2.png
          29 kB
          Ilgun Ilgun
        4. case3a.png
          28 kB
          Ilgun Ilgun
        5. case3b.png
          29 kB
          Ilgun Ilgun
        6. case4.png
          41 kB
          Ilgun Ilgun
        7. case5.log
          10 kB
          Ilgun Ilgun
        8. config.modules.contacts.apps.contacts.subApps.detail.editor.form.tabs.personal.fields.rewardUrl.xml
          13 kB
          Ondrej Chytil

          Issue Links

            Activity

              People

              Assignee:
              ilgun Ilgun Ilgun
              Reporter:
              ochytil Ondrej Chytil
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1.5d
                  1.5d