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

Simulating the portal environment with dashboard

The dashboard component is a layout component with the drag-and-drop ability to support reordering of the panels.

How to do it...

A basic definition for a dashboard with six panels would be as follows:

<p:dashboard id="board" model="#{dashboardController.model}"> <p:ajax event="reorder" listener= "#{dashboardController.handleReorder}" update="growl" /> <p:panel id="calculator" header="Calculator"> <h:outputText value="Content for Calculator" /> </p:panel> <p:panel id="calendar" header="Calendar"> <h:outputText value="Content for Calendar" /> </p:panel> <p:panel id="contact" header="Contacts"> <h:outputText value="Content for Contacts" /> </p:panel> <p:panel id="dictionary" header="Dictionary"> <h:outputText ...

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