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

Navigating to another page in AJAX calls

PrimeFaces' users often ask "Why don't navigations work with PrimeFaces CommandButton and CommandLink?", "How can we navigate to any page on a node click in a Tree?", or "How can we change the view when a row in a DataTable is double-clicked?". These are questions that are mainly related to JSF rather than PrimeFaces, but we will give answers to these questions in this book due to their importance.

In this recipe, we will show a programmatic navigation with JSF NavigationHandler as well as a declarative way to do a cross-page navigation in AJAX calls.

How to do it...

All three questions mentioned above have the same nature. JSF and PrimeFaces do not support a forward-based navigation within an AJAX request. ...

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