Search in menu

Post Reply
mhm.ghanem
Posts: 3
Joined: 29 Mar 2017, 14:53

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

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>

mhm.ghanem
Posts: 3
Joined: 29 Mar 2017, 14:53

16 Oct 2017, 14:55

Any one can help in this please ?

User avatar
aragorn
Posts: 3164
Joined: 29 Jun 2013, 12:38

01 Nov 2017, 11:17

I think it is not a Barcelona Layout or Theme. I think you need to check your search method and create new menu model after the search.

mhm.ghanem
Posts: 3
Joined: 29 Mar 2017, 14:53

06 Nov 2017, 10:19

Actually it is not related to search method I am using, I just put an action that just updates the menu and got the same result !

cagatay.civici
Prime
Posts: 17987
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Dec 2017, 11:01

I'd just do the search at client side and hide the elements like we did at PrimeFaces showcase, you may get the code from github as well to see how we did the search at PrimeFaces showcase;

http://www.primefaces.org/showcase/

Post Reply

Return to “Barcelona - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest