11 Replies Latest reply on Oct 1, 2009 11:29 AM by Alexander Smirnov

    Compare Passwords

    Janosch Rohdewald Newbie

      Hello,
      I'm actually creating a registration page. In this page a user has to confirm his password. Now, I want to display a message as soon the user has confirmed the password, that password and the confirmation are not equal.
      I already googled a lot, but without success.

      That's what I try:

      <h:outputLabel value="#{msg.password}" />
      <h:inputText id="password" value="#{registerUser.password}">
       <r:ajaxValidator event="onblur" reRender="password"
       ajaxSingle="true" />
      </h:inputText>
      <r:message for="password" />
      
      <h:outputLabel value="#{msg.password_confirm}" />
      <h:inputText id="password_confirm"
       value="#{registerUser.passwordConfirm}">
       <a:support event="onblur" action="#{registerUser.checkPasswords}"
       ajaxSingle="true" />
      </h:inputText>
      <r:message for="password_confirm" />
      


      In the method checkPasswords, I only get the confirmPassword, the password is null.

      Thanks for helping
      joschi03