O'Reilly logo

PrimeFaces Cookbook by Mert Çalışkan, Oleg Varaksin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Layout pitfalls with menus and dialogs

When working with the Layout component, we should be aware of pitfalls with menus and dialogs inside layout units. Beginners often face overlap issues and try to find several workarounds. In fact, there are easy solutions available.

In this recipe, we will show how to overcome these issues. We will integrate p:menubar and p:dialog into layout units.

How to do it...

Assume we have a full page layout with two layout units, center and north. The north unit contains a Menubar component with quite normal options.

<p:layout fullPage="true"> <p:layoutUnit position="center"> Center </p:layoutUnit> <p:layoutUnit position="north" size="80" resizable="false"> <h:form> <p:menubar> <p:submenu label="JavaScript Libraries"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required