The Nightmare
The Nightmare

Reputation: 701

Password field in editing

When I want edit my user I have a problem with the password field. When I select my user to edit I can edit first name, last name and password but I can edit only first name and leave the password field unchanged. When I click edit start I receive an error:

The password field is empty.

My password field:

<p:password id="password" value="#{userMB.user.password}" label="#{msg.password}" required="true">
    <f:validator validatorId="passwordValidator2" />   
    <p:ajax update="msgPassword" event="keyup" /> 
</p:password>

Why?

When I changed the <p:password> with <h:inputText> it worked fine. But I see password my user... Why <p:password> does not read the initial value of userMB.user.password?

Upvotes: 2

Views: 1984

Answers (1)

Andy
Andy

Reputation: 6598

Add redisplay = "true" to your password component

<p:password id="password" value="#{userMB.user.password}" label="#{msg.password}" required="true" redisplay = "true">

Upvotes: 6

Related Questions