title: jsf inputText not refreshing when i reset the bean's property
body: <p>My screen looks like this</p>
  
  <p><a href="https://i.stack.imgur.com/BJwb2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BJwb2.png" alt="enter image description here"></a></p>
  
  <p>The problem is that, when I press the Reset Button, the Code input field does not clear, as it was supposed to.</p>
  
  <p>The jsf is the following: </p>
  
  <pre><code>&lt;h:form id="form1"&gt;
      &lt;h:inputText id="code" value="#{MyBean.data.code}" /&gt;
  
      &lt;a4j:commandButton  immediate="true"
          action="#{MyBean.clear}" render="form1" update="@form"&gt;
      &lt;/a4j:commandButton&gt;
  
      &lt;h:outputText value="#{session.lastAccessedTime}"&gt;
            &lt;f:convertDateTime pattern="HH:mm:ss.SSS" type="date" /&gt;
      &lt;/h:outputText&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>The bean code is the following:</p>
  
  <pre><code>public class MyBean {
  
      DataInnerClass data = new DataInnerClass(); 
      //getter and setter for data
  
      public class DataInnerClass {
  
          private String code;
          //getter and setter for code
  
          public DataInnerClass() {
              super();
          }
      }
  
      public void clear() {        
          data = new DataInnerClass();
          Logger.getLogger( MyBean.class.getName() ).log(Level.SEVERE, "data.code="+data.code);
          //logs data.code=null
      }
  }
  </code></pre>
  
  <p>When I press the Reset button, the log shows that the value of the field <code>code</code> has become null (its no longer 'ZZ'); i also know that the screen refreshes successfully, because i have displayed the current time, which updates after every click. So the backing bean property changes, the screen refreshes, and still the input field keeps the same value. Do you have any idea why this is happening?</p>