I pull a List of countries from db2 using hibernate like this:
public List getCountries() {
                return getHibernateTemplate().find("from Country"); }

In my managed bean I inject a manager and use it to call the above:
public List getCountryList(){           
                return  countryManager.getCountries() ;
        }

You proabably already see my problem... In my jsp, this doesn't work:
<h:selectOneMenu id="parentCountryList" value="#{parentForm.selectedCountry
}" >            
    <f:selectItems value="#{parentForm.countryList}"/>
</h:selectOneMenu>

Error message: java.lang.IllegalArgumentException: Collection referenced by
UISelectItems with id parentForm:_id3 does not contain Objects of type
SelectItem

When/how do I make the country objects SelectItem(s)???
--
View this message in context: 
http://www.nabble.com/%3Cnewbie-%3E-selectOneMenu-t1487788.html#a4030320
Sent from the MyFaces - Users forum at Nabble.com.

Reply via email to