myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Ruffin <jruf...@achfood.com>
Subject <newbie?> selectOneMenu
Date Fri, 21 Apr 2006 17:03:28 GMT

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.


Mime
View raw message