Richfaces: dropDownMenu action
I understand, how to set action to rich:menuItem component, but can i somehow set action on rich:dropDownMenu? Parameter action cannot be set in rich:dropDownMenu component, only in dropDownMenus child rich:menuItem. Maybe there开发者_StackOverflow中文版 is another approach?
Action setting to rich:menuItem:
<rich:menuItem submitMode="server" value="#{msg.someValue}" action="#{billdoc.list}">
I need to execute some action #{billdoc.someAction}, when user clicks on dropDownMenu.
If you are really sure you need this (it's rather strange), you can use <rich:dropDownMenu onexpand="myFunction()"
, and define myFunction
as:
<a4j:jsFunction name="myFunction" action="#{billdoc.someAction}" />
精彩评论