"Invalid Option" errors when submitting a form.

Almost every selectOneMenu with integer as value doesn't work anymore after upgrade from 1.1.4. They say "Invalid Option" at every form submit. SelectItems are populated from database, and converted to string.

Short answer: Old behavior was broken. New behavior matches the spec. Long answer: Read through this thread, probably starting at the beginning (postings after the one below probably aren't relevent to your issue):

http://www.mail-archive.com/users@myfaces.apache.org/msg34395.html

Solution: Make sure that your itemValue attributes have value bindings that return the correct type. If your value points to a Long, this can be as simple as using "#{3}" to return a Long 3. Otherwise, you'll have to convert or fetch the correct value type yourself.


Tomahawk_1.1.4_to_1.1.5 (last edited 2009-09-20 23:01:49 by localhost)