2 Replies Latest reply on May 6, 2008 4:39 PM by infinity2heaven

    Converting rich:calendar date to java.sql.Date

    infinity2heaven

      <rich:calendar datePattern="MMM-yyyy"
      value="#{foo.timePeriod}"/>

      I'm using JBoss Seam 2.0 with Richfaces 3.x. My entity has a java.sql.Date type and I need to bind the richfaces calendar component to this type. On using the above code directly, I always get an illegal argument exception
      (proabably because it cant convert from java.util.date to java.sql.date)

      java.lang.IllegalArgumentException: argument type mismatch

      I cant even do this manually in the setter method as this exception gets raised even before the setter on my entity bean is called.

      Any suggestions?