Search in menu
Posted: 11 Oct 2017, 13:17
I am trying to have a feature to search in menu. I put a search input text above menu and on key up it updates menu. The case is that menu items that match my search criteria appear as blank unless I click the icon of the module, the other strange thing is that Profile & Notification buttons become not clickable.
You can view it life here:
http://82.212.87.26:9991/ereg-admission-web
Login as admin/admin123 . open the menu in the right you will find a search box, enter the text 'param' and notice that menu results are blank, if you click the icon the item shows, and if you try to click on profile or notifications they don't respond.
The code of menu.xhtml is attached
You can view it life here:
http://82.212.87.26:9991/ereg-admission-web
Login as admin/admin123 . open the menu in the right you will find a search box, enter the text 'param' and notice that menu results are blank, if you click the icon the item shows, and if you try to click on profile or notifications they don't respond.
The code of menu.xhtml is attached
Code: Select all
<h:form id="menuFrm">
<div class="layout-sidebar #{guestPreferences.darkMenu ? 'layout-sidebar-dark': ''}">
<p:inputText placeholder="" value="#{menuMB.searchText}" styleClass="search-menu" autocomplete="false">
<p:ajax event="keyup" delay="1000" listener="#{menuMB.searchMenu}" update="@form" />
</p:inputText>
<pa:tabMenu id="tabMenu">
<c:if test="${not empty menuMB.systemMenuMap.get(sys.GENERAL_SETTINGS)}">
<pa:tab id="generalSettings" icon="subject" title="#{msgs.getLabel('menu.generalSettings')}"
rendered="#{not empty menuMB.systemMenuMap.get(sys.GENERAL_SETTINGS)}">
<h:form id="menu-form">
<pa:menu id="gsMenu" widgetVar="me1" model="#{menuMB.getMenuModelForSystem(sys.GENERAL_SETTINGS)}" />
</h:form>
</pa:tab>
</c:if>
<c:if test="${not empty menuMB.systemMenuMap.get(sys.ACADEMIC_SETTINGS)}">
<pa:tab id="academicSettings" icon="school" title="#{msgs.getLabel('menu.academicSettings')}"
rendered="#{not empty menuMB.systemMenuMap.get(sys.ACADEMIC_SETTINGS)}">
<h:form id="menu-form2">
<pa:menu id="acdMenu" widgetVar="me2" model="#{menuMB.getMenuModelForSystem(sys.ACADEMIC_SETTINGS)}" />
</h:form>
</pa:tab>
</c:if>
<c:if test="${not empty menuMB.systemMenuMap.get(sys.ADMISSION)}">
<pa:tab id="admission" icon="account_balance" title="#{msgs.getLabel('menu.admission')}"
rendered="#{not empty menuMB.systemMenuMap.get(sys.ADMISSION)}">
<h:form id="menu-form3">
<pa:menu id="adMenu" widgetVar="me3" model="#{menuMB.getMenuModelForSystem(sys.ADMISSION)}" />
</h:form>
</pa:tab>
</c:if>
</pa:tabMenu>
</div>
</h:form>