3 Replies Latest reply on Mar 27, 2007 1:08 PM by henderson_mk

    problem with validation on selectitems

    henderson_mk

      Hiya,

      Having some diffs getting validation working on a select item list.

      <s:validateAll>
       <tr>
       <td class="cntForm"><h:outputText value="#{msgs.newCustomerRegion} "/></td>
       <td class="cntForm">
       <h:selectOneListbox id="region" required="true" size="3" value="#{customer.region}" converter="GeographicalRegionConverter">
       <f:selectItems value="#{selectItems.regions}" />
       </h:selectOneListbox> *
       </td>
       <td><h:message for="region" styleClass="cntError" /></td>
       </tr>
      </s:validateAll>
      


      backing bean:

       @OneToOne
       @NotNull(message="Please select a region")
       public GeographicalRegion getRegion() {return region;}
       public void setRegion(GeographicalRegion region) {this.region = region;}
      


      but when I click through without setting a value... it just doesn't fire the validation.
      I think I may be missing something silly...?
      Perhaps someone can point me in the right direction?

      thanks

      marty