title: JSF2 InputText for Long value also takes string
body: <p>I have an p:inputText field in my JSF 2 form which is mapped to a </p>
  
  <pre><code>HashMap&lt;String, Long&gt; 
  </code></pre>
  
  <p>values like this:</p>
  
  <pre><code>&lt;p:inputText id="input1" value="#{simpleFormTest.longValues['input1']}" /&gt;
  </code></pre>
  
  <p>Now, when I submit a string value in that input text and iterate through my map of Long objects, I can see the string value there. There is no conversion exception ond classCastException. When I submit the form once more I get an exception NumberFormatException. when converting the value. It is interesting that the conversion where I get the exception happens when reading the old value from the map, not when trying to set the new one. Does anyone no, if this is some bug in JSF, or how to avoid it? I've found out that when I explicitelly set the LongConverter for that field it is working, but shouldn't this be done implicitely? Thanks.</p>
  
  <p>Here is a simple test:</p>
  
  <p>SimpleFormTest.java</p>
  
  <pre><code>@Named("simpleFormTest")
  @ConversationScoped
  public class SimpleFormTest implements Serializable {
      private Map&lt;String, Long&gt; longs = new HashMap&lt;String, Long&gt;();
  
      public String submitAction() {
          log.info("(Long): " + longs.get("test"));
      }
  
      public Map&lt;String, Long&gt; getLongs() {
          return longs;
      }
  
      public void setLongs(Map&lt;String, Long&gt; longs) {
          this.longs = longs;
      }
  }
  </code></pre>
  
  <p>layout.xhtml:</p>
  
  <pre><code>&lt;h:form id="new-form"&gt;
      &lt;p:inputText value="#{simpleFormTest.longs['test']}" /&gt;
      &lt;p:commandButton action="#{simpleFormTest.submitAction}"
  &lt;/h:form&gt;
  </code></pre>
  
  <p>If I submit the form I get following log message:</p>
  
  <pre><code>[com.example.SimpleFormTest] (default task-15) (Long): aa
  </code></pre>