File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes how to edit <h:SelectOneMenu> Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how to edit <h:SelectOneMenu>" Watch "how to edit <h:SelectOneMenu>" New topic
Author

how to edit <h:SelectOneMenu>

peter aerts
Greenhorn

Joined: Jan 22, 2009
Posts: 29

Hello.
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}">
</h:selectOneMenu>


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";
}
[size=12]
[/size][color=black]
[/color]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to edit <h:SelectOneMenu>
 
Similar Threads
Is it possible to refresh the dropdown h:selectOneMenu
Error binding a h:selectOneMenu to a LinkedList
selected value through select items
Birth Date nightmare - passing variable between beans and java objects
List<SelectItem> sort