clearMenuState for Ultima theme

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
umaair_653
Posts: 3
Joined: 05 Feb 2016, 12:33

21 Apr 2017, 13:52

Hi,
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"/>
2.Or in login function:

Code: Select all

 RequestContext requestContext = RequestContext.getCurrentInstance();
 requestContext.execute("PF('mainmenu').clearMenuState();");
 
for xhtml it looks following:

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>
   
thanks you,

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

25 Apr 2017, 08:13

Or

You can try to call PF('yourwidgetvar').clearMenuState() after clicking logout button/link;

in topbar.xhtml

Code: Select all

..
xmlns:p="http://primefaces.org/ui"
xmlns:jsf="http://xmlns.jcp.org/jsf">
...
<li role="menuitem">
    <a href="#" jsf:action="#{bean.logout}">
        <i class="material-icons">&#xE8AC;</i>
        <span>Logout</span>
    </a>
</li>
...
More information is at;
https://www.beyondjava.net/blog/jsf-2-2 ... eat-sheet/
http://www.oracle.com/technetwork/artic ... 27136.html

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests