I have a PrimeFaces website with a left hand side menu. The menu has several menuitems:
<p:menuitem
value="#{msgs['text.menuitemMessage']}"
action="#{miClass.menuitemAction}"
styleClass="mnt-icon icon_24 #{miClass.getStyle('parameter')}"
global="false" />
The menuItem gets made nicely with an onclick value that comes from the miClass.menuitemAction method. Is it possible to overwrite the PrimeFaces onclick function in javascript ? Like in a very specific setting on only one page. A check is performed when a menuItem is clicked and if the check return true the usual onclick action is performed, if the check is false the onclick is overwritten with return false.