4 Replies Latest reply on Oct 14, 2008 1:22 PM by mail.micke

    Value is not valid when using s:selectItems and h:selectOneMenu

    mail.micke

      Hi


      I'm struggling with a simple dropdown menu which contains Date objects.


      I'm getting Value is not valid validation error and I'm not quite sure how to get around this.


      The backing List is a simple ArrayList<Date>.


      And this is my XHTML code:


      <h:selectOneMenu id="riskDateInput" value="#{sdb2.sdbParams.riskDate}">               
           <s:selectItems value="#{sdb2.riskDates}"
                               var="rd"
                               label="#{lcf:formatDateDash(rd)}"
                               itemValue="#{rd}"/>
           <s:convertDateTime/>
      </h:selectOneMenu>
      <h:commandButton value="Risk Date" action="#{sdb2.init()}"/>
      



      The backign bean is PAGE scoped.


      I've tried both <s:convertDateTime/> and <f:convertDateTime pattern="yyyy-MM-dd"/> with the same result.


      Tried loads of alternatives, but keep getting this error.


      Cheers,
      Micke