aspose file tools
The moose likes JSF and the fly likes how to edit <h:SelectOneMenu> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "how to edit <h:SelectOneMenu>" Watch "how to edit <h:SelectOneMenu>" New topic

how to edit <h:SelectOneMenu>

peter aerts
Ranch Hand

Joined: Jan 22, 2009
Posts: 32

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";
I agree. Here's the link:
subject: how to edit <h:SelectOneMenu>