[jboss-user] [JBoss Seam] - Problem with selectItems
hasc
do-not-reply at jboss.com
Mon Mar 26 11:23:49 EDT 2007
Hi,
im trying my best to get a selectbox filled with objects. I tried the following simple example:
| @Stateless
| @Name("buildinglist")
| public class ItemListAction implements ItemList,Serializable{
|
| public List buildingList;
|
| @Factory("buildingList")
| public void listBuildings(){
| this.buildingList = new ArrayList();
| SelectItem item = new SelectItem("1", "My First Item");
| this.buildingList.add(item);
| item = new SelectItem("2","My Second Item");
| this.buildingList.add(item);
| }
| }
|
and i try to access and display it via the followin code:
| <h:selectOneMenu>
| <f:selectItem itemLabel="" itemValue="null"/>
| <f:selectItems value="#{buildingList}"></f:selectItems>
| </h:selectOneMenu>
|
when i request the page i get the following error;
| "Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(j_id10).
Can someone help me please...
regards,
hannes
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031625#4031625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031625
More information about the jboss-user
mailing list