O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

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

Understanding PrimeFaces selectors

The jQuery library has great support for selecting DOM elements based on various criteria such as ID, name, or CSS class and so on.

Following are a few examples on how to use jQuery Selectors to select DOM elements:

  • $("p"): All <p> elements
  • $("#userId"): The element with id="userId"
  • $(".navbar"): All elements with class="navbar"

PrimeFaces has integration with the jQuery Selector API for referencing JSF component models. So you can use the jQuery Selector API to choose components to be processed or updated.

In most of the scenarios, using the jQuery Selector API for finding UI components yields better performance as the components are picked by navigating through the DOM tree on the client side instead of navigating ...

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