File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to edit <h:SelectOneMenu>

 
peter aerts
Ranch Hand
Posts: 32
MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic