You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dennis Kieselhorst (JIRA)" <de...@myfaces.apache.org> on 2014/02/03 11:36:08 UTC
[jira] [Created] (TOBAGO-1362) Support dynamic list of objects for
f:selectItems
Dennis Kieselhorst created TOBAGO-1362:
------------------------------------------
Summary: Support dynamic list of objects for f:selectItems
Key: TOBAGO-1362
URL: https://issues.apache.org/jira/browse/TOBAGO-1362
Project: MyFaces Tobago
Issue Type: New Feature
Components: Themes
Affects Versions: 2.0.0-alpha-3
Reporter: Dennis Kieselhorst
In JSF 2.0 it's not necessary to convert to List<SelectItem> or SelectItem[], e.g. List<Country> can be used like this:
<f:selectItems value="#{bean.countries}" var="country"
itemValue="#{country.code}" itemLabel="#{country.name}" />
See also: http://stackoverflow.com/tags/selectonemenu/info or
http://jsfatwork.irian.at/book_de/standard_components.html#!idx:/standard_components.html:fig:selectitems-example
Currently Tobago throws a ClassCastException at org.apache.myfaces.tobago.renderkit.util.RenderUtils.getSelectItems(RenderUtils.java:339).
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)