Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

JSF InputSecret Example – Password Field

13 total views, 2 views today

JSF InputSecret Example _ Password Field

The JSF InputSecret field renders an HTML tag of type Password. An asterisks (*) symbol comes for each character in the password field. Setting redisplay=false attribute empties the password field whenever refresh happens on the browser.

JSF =>

HTML =>

Below we covered the JSF Password field with an example.

JSF h:inputSecret Example

Below is the JSF contains the field with redisplay=false attribute . The Password field is bound to the backing bean class.

Below is the backing bean class; The value of the InputSecret bound to the password field.

import javax.faces.bean.ManagedBean;

@ManagedBean
public class User {

	private String password;

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		System.out.println("Password = "+password);
		this.password = password;
	}
}

The h:inputSecret Page renders like below in the browser.

Download the Source code:

JSF_PASSWORD_EXAMPLE
 


This post first appeared on Oracle ADF, BPM, BI And Primavera P6 Tutorials, please read the originial post: here

Share the post

JSF InputSecret Example – Password Field

×

Subscribe to Oracle Adf, Bpm, Bi And Primavera P6 Tutorials

Get updates delivered right to your inbox!

Thank you for your subscription

×