Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-745

Bean validation for collections of bindable types fail when elements are proxies

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.0.Final
    • Component/s: None
    • Labels:
      None

      Description

      When validating a collection of bindable types Errai can't unwrap the potentially proxied list elements which causes the proxy fields to get validated instead of the actual fields.

      Example:

      @Bindable
      @Portable
      public class ComponentData {
          @Size(min = 5, max = 10)
          private String title = "";
       
          @NotNull @Valid
          private List<Data> dataList = new ArrayList<Data>();
      }
       
      @Bindable
      @Portable
      public class Data {
          @Size(min = 1)
          private String name = "";
      }
      

      If dataList contains plain Data objects everything works as expected. However, validation won't work if dataList contains bindable proxies of Data.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                csa Christian Sadilek
                Reporter:
                csa Christian Sadilek
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: