it is stated in Ultima documentation that State is saved via a cookie and to remove it define a widgetVar to the menu and call PF('yourwidgetvar').clearMenuState().
how would i call this PF function?
Currently i have tried two following things:
1. at the time of login:
Code: Select all
<p:commandButton action="#{loginView.login}" value="Sign In" icon="ui-icon-person" oncomplete="PF('mainmenu').clearMenuState()" update="msgs"/>
Code: Select all
RequestContext requestContext = RequestContext.getCurrentInstance();
requestContext.execute("PF('mainmenu').clearMenuState();");
Code: Select all
<h:form id="menuform">
<div class="layout-menu #{guestPreferences.menuClass}">
<div class="nano">
<div class="nano-content menu-scroll-content">
<pu:menu widgetVar="mainmenu">
</pu:menu>
</div>
</div>
</div>
</h:form>