0 Replies Latest reply on Mar 1, 2012 11:56 AM by Yevgen Bushuyev

    @Size validation sample

    Yevgen Bushuyev Newbie


      Is it possible to use @org.hibernate.validator.Size put on a class member which is displayed with some UIDataAdaptorBase ancestor (table, dataList) ?


      My sample:


      public class Customer {




          private String firstName;





          private List<Address> addresses = new ArrayList<Address>();





      it's displayed with


      <h:form id="customerForm">



           <h:inputField value="#{customer.firstName}"/>


            <rich:dataTable id="addresses" value="#{customer.addresses}" var="address">






      I want to ensure that there is at least one address in a customer. As far as I can understand in UIDataAdaptorBase it only calls its childrens' validators thus @Size annotation has no effect. Also I can't find any sample with that @Size neither in seam nor on the web.


      Any help is highly appreciated