Arash K
Arash K

Reputation: 13

How to turn off redisplay of p:password?

I have a problem with this code:

<h:outputLabel for="password" value="password" />
<p:password id="password" 
                value="#{user.password}"
                required="true" label="password"
                feedback="true"
                minLength="1"                                                    
                requiredMessage="Enter password"/>
<p:message for="password" />

The submitted password is redisplayed after submit. How can I avoid this from managed bean on?

Upvotes: 0

Views: 803

Answers (2)

Koekiebox
Koekiebox

Reputation: 5963

You can explicitly call setPassword("") from the login() method as soon as you retrieved the password.

Upvotes: 2

Jigar Joshi
Jigar Joshi

Reputation: 240948

Store password in @RequestScoped scope just to check

Upvotes: 0

Related Questions