title: How do I pass current User and inputText value to Java-Controller?
body: <p>I have a spring project with Primefaces. What I want to do is, to force password change on initial-login.</p>
  
  <p>I created an xhtml-page which checks if the password equals the standard-password, if so than the user gets redirected to a passwordChange-form.</p>
  
  <p><strong>Below the Form-Content</strong></p>
  
  <pre><code>&lt;p:password id="password" name="password" placeholder="New Password"/&gt;
  &lt;p:password id="passwordConfirm"  placeholder="Password Confirmations"/&gt;
  &lt;p:commandButton action="#{parentEditController.doChangePassword()}" icon="ui-icon-refresh" 
                   title="Change Password" oncomplete="/secured/welcome.xhtml"/&gt;
  </code></pre>
  
  <p>How do I get the password string to the <code>doChangePassword()</code> in my UserController? The <code>doChangePassword()</code>-method calls <code>userService.changePassword(password)</code>-method in which the password string is set as password for the current user and gets stored to DB via <code>userRepository.save(user)</code>.</p>
  
  <p>My main problem is to get the password string to my controller so I'm able to pass it as string to the <code>userService.changePassword(String: password)</code>.</p>
  
  <p>Hope anyone can help me?</p>