O'Reilly logo

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

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

Blocking page pieces during long-running AJAX calls

The blockUI component allows us to block any piece(s) of a page during AJAX calls. Blocking is initiated by one or more trigger components. The blockUI component adds a layer and any custom content over the target elements to be blocked and gives the appearance and behavior of blocking user interaction. It is very handy if you have, for example, a large dataTable component, and sorting, filtering, and pagination takes much time. You can block almost everything—even the entire page.

In this recipe, we will implement p:panel and p:dataTable that are blockable in order to learn all the features of p:blockUI.

How to do it…

The panel component in the following code snippet gets blocked when the command ...

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