Whenever i try to update element around icarus menu (form) it removes events on sub menus, so they cannot be closed or opened.
example code. After pressing test button menu stops working.
Code: Select all
<h:form id="menuform">
<pi:menu widgetVar="appMenu">
<p:submenu label="Tasks" icon="fa fa-tasks" >
<p:menuitem value="Active" icon="fa fa-tasks" />
</p:submenu>
</pi:menu>
<p:commandButton value="test" update="menuform"></p:commandButton>
</h:form>
Code: Select all
bindEvents: function() {
var $this = this;
this.sidebarNav.nanoScroller({flash: true});
this.slimToggleButton.on('click', function(e) {
$this.toggleMenu();
e.preventDefault();
});
//TODO find a better way to allow update
this.menulinks = $('a.menuLink');
this.menulinks.on('click',function(e) {
...............