0

I have created a custom converter for converting from and to org.joda.time.LocalDate for primefaces calendar component. Unfortunately my converter will never be invoked (annotated like below) or even when I try to register my converter in faces-config(for that I've removed all annotations from the custom converter). Instead I get an Exception that java.util.Date cannot be converted to LocalDate.

I don't want to configure the converter as a tag attribute. Instead the converter should be automatically fetched and used for conversion to and from LocalDate.

@FacesConverter(forClass=LocalDate.class) public LocalDateConverter implements Converter {...}

Thanks in advance

Update:

Here I found the answer why Primefaces calendar does not support converter with forClass.

Community
  • 1
  • 1
schoener
  • 795
  • 5
  • 12
  • Hi, welcome to StackOverflow. Please read [ask], [mcve] and http://www.stackoverflow.com/tags/jsf/info and improve your question. To cumbersome for anyone to even try to replicate and find a possible cause – Kukeltje Oct 21 '16 at 08:51
  • 1
    Hello, probably these two links will help... http://stackoverflow.com/questions/34883270/how-to-use-java-time-zoneddatetime-localdatetime-in-pcalendar and http://stackoverflow.com/questions/30395398/fconvertdatetime-support-for-java8-localdate-localdatetime – chaeschuechli Oct 21 '16 at 14:14
  • @chaeschuechli thx a lot! – schoener Oct 21 '16 at 21:35

0 Answers0