webtier@glassfish.java.net

null not a valid value for radio button

From: <webtier_at_javadesktop.org>
Date: Tue, 02 Dec 2008 12:53:21 PST

I have a java method that creates a list of SelectItems for use in our facelets UI. The list consists of all values of a given Enumeration, and one other SelectItem with a display text of "Any" and a value of null. I'm able to use a List like this within a selectOneListbox without problems. The setter in my bean takes the Enum type as the value, and if "Any" is checked, the null value is passed to the setter. Very simple and works like a charm.

I would like to use the same mechanism in another area but have it rendered as selectOneRadio instead. Unfortunately, a list with a null value causes a NullPointerException in RadioRenderer on line 107 ( jsf-impl 1.2_07 but it doesn't look like the applicable logic has changed for 1.2_10 ).

Is there any chance of getting this done?
[Message sent by forum member 'jweight' (jweight)]

http://forums.java.net/jive/thread.jspa?messageID=319644