Im doing a application with logout and login options.
When someone open randon menu tab and after this do logout, i wanna reset the current tab actived to the first tab...because when another ppl log in the same browser, the menu came opened in the last tab that previous user gone.
How can i do it?
How force menu activeIndex back to 0?
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
You can clear menu state after login or logout. Please try ;
Code: Select all
//bean
public void login/logout_Method() {
RequestContext.getCurrentInstance().execute("clearState");
}
//xhtml
<script type="text/javascript">
function clearState() {
var $this = PF('me');
if($this) {
$this.clearMenuState();
$this.clearActiveItems();
}
};
</script>
<pm:menu widgetVar="me" .../>
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 2 guests