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

Enhanced password input

The password component is an extended version of the JSF <h:inputSecret> component, which also provides a strength indicator and the match mode.

How to do it...

The basic declaration for the component will provide no feedback on the input password, and will just render a simple input component.

<p:password value="#{passwordController.password}" />	

To enable the strength indicator, the feedback attribute should be set to true. By default, the indicator will be rendered right next to the component when it is hovered.

How to do it...

When feedback is enabled, it's also possible to set the prompt label and the strength label with the promptLabel ...

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