0

Im trying to create a Registartion form but i need the user to select and put their password in, then confirm their password.

How would i implement a check to see if these match and if they do stroe them in a RegsisteredBean.java file in a variable.

Im a complete beginner with JSF and XHTML.

Thanks

3

1 Answer 1

1

A simple and quick solution is actually done using the primefaces component as below (using the match attribute):

<h:outputLabel for="pwd1" value="Password 1: *" />  
<p:password id="pwd1" value="#{passwordBean.password5}" match="pwd2" label="Password 1" required="true"/>  

<h:outputLabel for="pwd2" value="Password 2: *" />  
<p:password id="pwd2" value="#{passwordBean.password5}" label="Password 2" required="true"/>  

Here's a link to the official showcase examples.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.