-
1. Re: dynamic DropDownMenu
nbelaevski Sep 9, 2009 9:56 AM (in response to javatwo)Hi Dave,
You can use c:forEach tag to do that. -
2. Re: dynamic DropDownMenu
javatwo Sep 9, 2009 10:37 PM (in response to javatwo)Thanks for reply.
c:forEach can list all the menuItems. But when a menuItem is clicked, the method bean.showPerson() is called, but it does not know which person, John, Allen, or Smith, ... . If the menuItem can take a parameter, it will solve the problem. Thanks for further help.
Dave -
3. Re: dynamic DropDownMenu
javatwo Sep 9, 2009 10:40 PM (in response to javatwo)
<rich:dropDownMenu ...>
<c:forEach var="person" value="#{bean.personList}">
<rich:menuItem value="#{person.name}" action="#{bean.showPerson}" />
</c:forEach>
</rich:dropDownMenu> -
4. Re: dynamic DropDownMenu
javatwo Sep 9, 2009 10:47 PM (in response to javatwo)<rich:dropDownMenu ...>
<c:forEach var="person" value="#{bean.personList}">
<rich:menuItem value="#{person.name}" action="#{bean.showPerson}" >
<h:param name="personName" value="#{person.name}" />
</rich:menuItem>
</c:forEach>
</rich:dropDownMenu>
I wish <rich:menuItem> can take h:param -
5. Re: dynamic DropDownMenu
nbelaevski Sep 10, 2009 6:24 AM (in response to javatwo)- Call action method just at person
- Menu items should accept and understand parameter tags well