title: Form doesn't submit to the bean
body: <p>The form doesn't submit to the bean.</p>
  
  <p><code>login.xhtml</code></p>
  
  <pre><code>&lt;h:form&gt;
      &lt;p:panel header="Login"&gt;  
          &lt;p:messages id="msgs" showDetail="true"/&gt;
          &lt;h:panelGrid columns="2" columnClasses="column" cellpadding="5"&gt;
              &lt;h:outputLabel for="user" value="Username" /&gt;
              &lt;h:inputText id="user" value="#{login.username}" /&gt;
  
              &lt;h:outputLabel for="pw" value="Passwort" /&gt;
              &lt;h:inputSecret id="pw" redisplay="false" value="#{login.password}" /&gt;
          &lt;/h:panelGrid&gt;
          &lt;p:button value="Anmelden" action="#{login.login}" type="submit" /&gt;
      &lt;/p:panel&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p><code>Login.java</code></p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class Login {
  
      private FacesContext fCtx;
      private String username;
      private String password;
  
      public Login() {
          fCtx = FacesContext.getCurrentInstance();
      }
  
      public String login(){
          HttpSession session = (HttpSession) fCtx.getExternalContext().getSession(false);
          String sessionId = session.getId();
          fCtx.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Info: ", getUsername()+", "+getPassword()+", "+sessionId));  
  
          return "login.xhtml";
      }
  
  
      public void setUsername(String username) {
          this.username = username;
      }
      public String getUsername() {
          return username;
      }
      public void setPassword(String password) {
          this.password = password;
      }
      public String getPassword() {
          return password;
          }
      }
  </code></pre>
  
  <p>There are even no exceptions in the logs. What's the problem and how can I fix it?</p>