Re: creating 'empty' select items

2006-08-12 Thread Glauco Pimentel Gomes
You can do this: SelectItems[] items = new SelectItems[] { new SelectItem(, (none)), new SelectItem(1, one), ... }; Glauco P. Gomes Laurie Harper escreveu: Mike Kienenberger wrote: If I recall, one of the constructors does allow you to inconsistently pass in a null.

Re: creating 'empty' select items

2006-08-12 Thread Cagatay Civici
Hi,Another solution will be;h:selectOneMenu value=#{SomeBean.someVariable} f:selectItem itemLabel= itemValue=/ f:selectItems value=#{ SomeBean.selectItemCollection}//h:selectOneMenuCagatayOn 8/12/06, Glauco Pimentel Gomes [EMAIL PROTECTED] wrote:You can do this:SelectItems[] items = new

creating 'empty' select items

2006-08-11 Thread Laurie Harper
How do I create an 'empty' SelectItem? I'd like to present a selectOneChoice which allows the target model value to be set to 'null'. But I can't create a 'null' SelectItem: SelectItems[] items = new SelectItems[] { new SelectItem(null, (none)), new SelectItem(1, one), ... };

Re: creating 'empty' select items

2006-08-11 Thread Laurie Harper
Mike Kienenberger wrote: If I recall, one of the constructors does allow you to inconsistently pass in a null. Unfortunately not, at least in 1.1.1 (the version I'm currently using); the only constructor that doesn't have the check is the no-args constructor :-) And in JSF 1.2, I just saw