Looking for Mega Menu & LayoutUnit

UI Components for JSF
Post Reply
murli.p.israni
Posts: 31
Joined: 15 Oct 2011, 14:12
Location: Mumbai, India

26 Oct 2011, 06:41

Hi,

Can any one please assist me for the JQuery Mega Menu plugin implementation in PrimeFaces, as I like the usability, since my application is having the bulk of URLs/Links, so the aggregation of links gives good usability.

As a limitation of the
1. p:menuButton can have only p:menuitem as child components
2. p:menu can have only p:submenu or p:menuitem as child components

Code: Select all

<p:menuButton value="Go To" >
            <p:menuitem value="Home"  url="/" icon="ui-icon ui-icon-home" />  
	    <p:menuitem value="Preferences"  url="/preferences/" icon="ui-icon ui-icon-wrench"/>
	    <p:menuitem value="Account Settings"  url="/preferences/" icon="ui-icon ui-icon-wrench"/>
	    <p:menuitem>
	    	<p:separator />
	    </p:menuitem>	    
	    <p:menuitem value="Logout"  icon="ui-icon ui-icon-wrench"/>
</p:menuButton>

Code: Select all


<p:menu type="tiered" rendered="true">
 // Single /multilevel of menu items (Incl. Sub Menu)
</p:menu>
My expectations are something like this -
http://www.geektantra.com/2009/09/jquery-mega-menu/
http://www.sohtanaka.com/web-design/meg ... ss-jquery/
http://codecanyon.net/item/css3-mega-dr ... ebdesigner (Premium plugin)
http://www.dynamicdrive.com/style/cssli ... line_tabs/

I am able to load this in the application, But there are few issues, I am facing -
- UNable to put the custom plugin code inside the top layout unit - Setting the ZIndex, Scrollable, Slidable, display:overflow -- Nothing is responding at north layout unit.
- Once I am pushing the code, inside layout unit, the scroll is coming, for the menu items (as Mouseover to the main menu)


Please let me know, any alternate solution for this.
Thanks,
Murli Israni

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

26 Oct 2011, 10:08

Hi Murli,

Layout pane containing the drop-down element must have the style 'overflow: visible'. There are other recommendations as well. Look here please http://layout.jquery-dev.net/documentat ... Drop-Downs

Many people have asked about Mega Menu. Mega Menu will be implemented in the PrimeFaces Extensions project. But not in the first release because we have a lot of work yet for the first release. So, I guess after PF 3.0 release we can start to implement a Mega Menu. This is on the TODO list.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

murli.p.israni
Posts: 31
Joined: 15 Oct 2011, 14:12
Location: Mumbai, India

28 Oct 2011, 06:45

Thanks alot,
Do you have any example for the same, or reference with PF 3.0 (Able to get the Layout instance in JS, But unable to do any more programming)

layout.getManager().toggle('right'); - Not responding, also page got stucked with undefined object
mainlayoutVar.getUnitByPosition('right').toggle(); - Same problem, But I think this is YUI Layout, which is depricated and JQuery layout introduced in 3.0 onwards.

Please comment on the same.
Thanks,
Murli Israni

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

28 Oct 2011, 11:12

AFAIK JQuery layout was introduced in 2.2.1. What is layout.getManager()....? Where did you see this example?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
lauksas
Posts: 4
Joined: 20 Feb 2012, 18:02
Location: Brazil

21 Feb 2012, 22:05

Hi, I'm new in prime faces. I'm trying to write a layout, but I'm facing the same issue as murli.p.israni... In the style I wrote as Oleg said, but no luck... The menu dos not show as it should...

see the code below:

Code: Select all

<p:menubar autoDisplay="true" style="overflow: visible;">
		<p:submenu label="Mail">
			<p:menuitem value="Gmail" url="http://www.google.com" />
			<p:menuitem value="Hotmail" url="http://www.hotmail.com" />
			<p:menuitem value="Yahoo Mail" url="http://mail.yahoo.com" />
		</p:submenu>
		<p:submenu label="Videos">
			<p:menuitem value="Youtube" url="http://www.youtube.com" />
			<p:menuitem value="Break" url="http://www.break.com" />
		</p:submenu>
	</p:menubar>
Did I put the style in the wrong element?

see what's happens on the link http://lauksas.dyndns.org/primeTest/facetTeste.xhtml

Thanks in advance!
--
No one is too smart that can't learn and no one is too dumb that can't teach.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

21 Feb 2012, 22:18

Hi and welcome to the PrimeFaces.

I didn't suggest to use style="overflow: visible;" I pointed to this link (underlying layout widget) http://layout.jquery-dev.net/documentat ... Drop-Downs You can see there "Working with Drop-Downs and Pop-Ups" and you can find there a link to demo. Look http://layout.jquery-dev.net/demos/simple.html

The problem is only AFAIK, PF doesn't expose allowOverflow, resetOverflow and showOverflowOnHover. We expose allowOverflow, resetOverflow in PF Extensions project, but these methods are not documented. showOverflowOnHover will be added to layout pane soon.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
lauksas
Posts: 4
Joined: 20 Feb 2012, 18:02
Location: Brazil

21 Feb 2012, 22:49

Thanks Oleg for the fast reply! but i just found the error, it was missing the !important notation in the css class. I never saw this notation in css until now... always learning :)
Regards!
--
No one is too smart that can't learn and no one is too dumb that can't teach.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 56 guests