When I use a <p:menuButton>
as follows:
<div id="div_menutop">
<h:form id="form_top">
<p:menubar id="mnb_top" >
<p:submenu label="Help" icon="ui-icon-help">
<p:menuitem ajax="true" process="@this" id="mn_item_help" update="@form" value="Hướng dẫn" actionListener="#{topprocess.helpListener}"/>
</p:submenu>
</p:menubar>
<p:commandButton ajax="false" action="#{secuser.logout()}" value="Thoát" />
<p:commandButton ajax="true" actionListener="#{topprocess.helpListener}" value="Thoát" />
</h:form>
</div>
Then it works, the actionListener
is called.
But when I try to put it in a template composition as follows:
<ui:composition>
<div id="div_menutop">
<h:form id="form_top">
<p:menubar id="mnb_top" >
<p:submenu label="Help" icon="ui-icon-help">
<p:menuitem id="mn_item_help" update="@form" value="Hướng dẫn" actionListener="#{topprocess.helpListener}"/>
</p:submenu>
</p:menubar>
</h:form>
</div>
</ui:composition>
Then the actionListener
is never called. What can be the cause of this problem?