webtier@glassfish.java.net

Re: [webtier] h:selectOneMenu with complex type for value

From: <webtier_at_javadesktop.org>
Date: Tue, 02 Mar 2010 10:48:15 PST

Thanks, Ryan (and Martin); helpful as always. I think I was thrown off by the language in the SelectItem JavaDocs that describes the Object as "the value to be delivered to the model if this item is selected by the user" and a JSF 1.x book I read ages ago that suggested that all you need to do is have &lt;h:selectOneMenu value="#{foo.color}"&gt; and then have getColor and setColor return/take the object type. Clearly, I misunderstood all along. I'll use the converter.

Cheers-

                          - Marty
------------
JSF 2.0 Training Course: http://courses.coreservlets.com/public-courses/jsf2/
[Message sent by forum member 'martyhall' (hall_at_coreservlets.com)]

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