title: JSF Ajax not rendering until a page refresh
body: <p>Here is my view:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"&gt;
  &lt;h:head&gt;
      &lt;title&gt;Welcome&lt;/title&gt;
  &lt;/h:head&gt;
  &lt;h:body&gt;
      &lt;h:form prependId="false" id="myForm"&gt;
  
          &lt;h3&gt;Please enter your name and password.&lt;/h3&gt;
  
          Name: &lt;h:inputText id="name" value="#{user.name}"/&gt;
  
          Password: &lt;h:inputSecret id="password" value="#{user.password}"/&gt;
  
          &lt;h:commandButton value="Login"&gt;
              &lt;f:ajax execute="name password" render="greeting"/&gt;
          &lt;/h:commandButton&gt;
  
          &lt;h:outputText id="greeting" value="Welcome + #{user.name}" rendered="#{user.nameRendered()}"/&gt;
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any my User.java : </p>
  
  <pre><code>@Named
  @SessionScoped
  public class User implements Serializable {
  
      private String name;
      private String password;
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
      public boolean nameRendered() {
          return this.name != null;
      }
  }
  </code></pre>
  
  <p>So when I type something in Name field and click submit, I expect to see outputText with id"greeting" because, user.nameRendered() should return true.</p>
  
  <p>However, I will need to refresh the page after I submit name to see it. Why might be the reason? Why does it require a page refresh? How can I do it without a page refresh? </p>