Good Day all,
I have the following on my page:
<h:selectOneMenu ....
<f:selectItem ItemValue="#{null}" ItemLabel="--" />
<f:selectItems value="#{myBean.sidList}" />
<h:selectOneMenu/>
The sidList is defined in the bean as HashMap with get/set as follows:
public HashMap<String,String> getSidList() return this.sidList;
public void setSidList(HashMap<string, String> sidList) this.sidList=sidList;
In the bean constructor, I load the hashmap, printout the values etc, all is good. However, the minute I try to access the page, I get "java.lang.nullpointerexception". The first line under that lists something wrong with the ...renderkit.SelectITemsIterator ...
Ummmmmm, ok. Here is the weird part. If I forgo loading sidList with a call to one of my java classes, and load the thing by hand
sidList.put("Nick", "Nick");
sidList.put("Zac", "Zac");
everything works fine ! The page loads and the dropdown is properly populated. I even tested with an empty list, and the ddlb worked fine.
Any ideas on what could be causing this?
Thanks in advance, Nick