Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to edit <h:SelectOneMenu>  RSS feed

peter aerts
Ranch Hand
Posts: 32
MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a <h:dataTable and i want to edit each row .
when i press on edit button row data appear blow the datagrid or dataTable.
one of the values that users can edit will fill into the <h:selectonemenu.
I want to Know how can i fill the <h:selectonemenu with own selected item at the top of the <h:selectonemenu>
I am sorry for bad english writing.
thank you.

<h:selectOneMenu value="#{course.selectedItem}" >
<f:selectItems value="#{course.comboItems}">

public String allCategory(){
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
CategoryManager categoryManager = (CategoryManager) ctx.getBean("categoryManager");
categoryList = categoryManager.getCategorys();
comboItems = new ArrayList<SelectItem>(categoryList.size());
for (Category categoryValue : categoryList) {
comboItems.add(new SelectItem(categoryValue.getId().toString(),categoryValue.getName()));
return "course_list";
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!