title: two date fields - one loses its value, the other works
body: <p>I have a form with two date input fields. The first field named <em>dateFrom</em> always loses its value at page reload while the second one named <em>dateTo</em> works perfectly. When I fill both fields, both values are passed to the UI Bean, and both are successfully used to filter the view (a list of items). The UI Bean stores both values in a statusObject with session scope.</p>
  <p>But after the page was updated, only <em>dateTo</em> is still filled while <em>dateFrom</em> one is empty. I've added some <code>System.out.println()</code>'s to the getters and settes of the values to see what happens and both setters are called with a value, then both getters return a value. The <em>dateFrom</em> field just ignores the value it gets from the UI Bean.</p>
  <p>I'm using the date field provided by the browser, hence the a:type=&quot;date&quot;.</p>
  <p>The page looks like this:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
            &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
        xmlns:a=&quot;http://xmlns.jcp.org/jsf/passthrough&quot;
        xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot;
        xmlns:f=&quot;http://java.sun.com/jsf/core&quot;
        xmlns:h=&quot;http://java.sun.com/jsf/html&quot;&gt;
  &lt;h:head/&gt;
  
  &lt;h:body&gt;
    &lt;ui:composition&gt;
  
      &lt;f:loadBundle basename=&quot;de.myapp.Resources&quot; var=&quot;bundle&quot;/&gt;
  
  &lt;!-- Some stuff removed for readability --&gt;
  
      &lt;h:form enctype=&quot;multipart/form-data&quot; id=&quot;filterForm&quot;&gt;
        &lt;div class=&quot;filterBar&quot;&gt;
          &lt;div class=&quot;filterElement&quot;&gt;
            &lt;h:inputText a:type=&quot;date&quot; id=&quot;dateFrom&quot; size=&quot;8&quot; maxlength=&quot;10&quot;
                         value=&quot;#{myBean.dateFrom}&quot;
                         converter=&quot;dateConverter&quot;/&gt;
          &lt;/div&gt;
          &lt;div class=&quot;filterElement&quot;&gt;
            &lt;h:inputText a:type=&quot;date&quot; id=&quot;dateTo&quot; size=&quot;8&quot; maxlength=&quot;10&quot;
                         value=&quot;#{myBean.dateTo}&quot;
                         converter=&quot;dateConverter&quot;/&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;filterElement&quot;&gt;
          &lt;h:commandButton id=&quot;refreshButton&quot;
                           action=&quot;#{myBean.refreshList}&quot;
                           value=&quot; #{bundle.refresh}&quot;/&gt;
        &lt;/div&gt;
  
      &lt;/h:form&gt;
  
  &lt;!-- Some more stuff removed for readability --&gt;
  
    &lt;/ui:composition&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>I've checked that the words <em>dateFrom</em> and <em>dateTo</em> do <strong>not</strong> occur in the parts of the page I've removed.</p>
  <p>Getters and setters in the UI Bean</p>
  <pre><code>public Date getDateFrom() {
    System.out.println(&quot;getDateFrom() -&gt; &quot; + statusObjet.getDateFrom());
    return statusObjet.getDateFrom();
  }
  
  public void setDateFrom(final Date dateFrom) {
    if (dateFrom != null) {
      System.out.println(&quot;setDateFrom( &quot; + dateFrom + &quot; )&quot;);
    } else  {
      System.err.println(&quot;setDateFrom( NULL )&quot;); // my IDE shows this colored red in the console
    }
    statusObjet.setDateFrom(dateFrom);
  }
  
  public Date getDateTo() {
    System.out.println(&quot;getDateTo() -&gt; &quot; + statusObjet.getDateTo());
    return statusObjet.getDateTo();
  }
  
  public void setDateTo(final Date dateTo) {
    if (dateTo != null) {
      System.out.println(&quot;setDateTo( &quot; + dateTo + &quot; )&quot;);
    } else {
      System.err.println(&quot;setDateTo( NULL )&quot;); // my IDE shows this colored red in the console
    }
    statusObjet.setDateTo(dateTo);
  }
  </code></pre>
  <p>Except the ID and the value EL, both fields are identical. Getters and setters are also identical (i've double-checked it). In fact, all the code for <em>dateTo</em> is a copy of <em>dateFrom</em>, that was changed in the editor after copying (replace all in selection).</p>
  <p>Why does <em>dateTo</em> work but <em>dateFrom</em> doesn't ?</p>