• Post Reply Bookmark Topic Watch Topic
  • New Topic

SelectMany with Custom Converter - getAsObject not called!

 
Dylan Honorez
Ranch Hand
Posts: 30
AngularJS Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ran across this issue on the Sun forums:
http://forum.java.sun.com/thread.jspa?threadID=5289768&tstart=135

I have a custom class Code. I use selectOneMenu with my CodeConverter to populate the list, select a value and give it back to my bean. Works perfectly.

The issues start when in my bean I change Code to Collection<Code>. I DO NOT get the infamous "Validation Error: Value not valid", but I get 'Conversion Error setting value ' 8009 8007' for '#{activitySeriesBean.activitySeries.targetGroup}'.

When debugging, I see that in my CodeConvertor 'getAsString' is called to populate my list, but when returning values, 'getAsObject' is never called!

Why?
 
Dylan Honorez
Ranch Hand
Posts: 30
AngularJS Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Changing from Collection<Code> to Code[] did the trick!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!