This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Populating IceFaces HtmlSelectOneListbox when not using xhtml  RSS feed

 
Kovacs Antal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am implementing comboboxes in an application where IceFaces forms are being built dynamically. There are no xhtmls around, we put together everything from Java code. This works nice so far, but I am stucked at HtmlSelectOneListbox. In my code I create one that appears on the form as well correctly, but I don't know how to add the SelectItems to it.



I can create instances of SelectItems or even SelectItemsTag but the combo has no methods to set them. It has only a setValue/setValueExpression and with that I could set my value binding expression to the object representing #{bean.value}. But the selectitems property should be set not on the listbox but its nested f:selectItems that I don't know how to create.
 
Kovacs Antal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to someone from stackoverflow I got the answer. I had to add UISelectItem and/or UISelectItems instances as children to the object.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!