title: Can’t get value of Map<Long, String> by key
body: <p>I have a <code>&lt;p:dataTable&gt;</code> where each row has an inputText like this:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;p:dataTable ... rowIndexVar="row"&gt;
      &lt;p:column&gt;
          &lt;p:inputText value="#{myBean.items[row + 1]}" /&gt;
      &lt;/p:column&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>The <code>items</code> property is a <code>Map&lt;Long, String&gt;</code>:</p>
  
  <pre><code>private Map&lt;Long, String&gt; items = new HashMap&lt;Long, String&gt;();
  </code></pre>
  
  <p>When I submit some data and manually iterate over the map, it apparently works:</p>
  
  <pre><code>Iterator itr = items.entrySet().iterator();
  while (itr.hasNext()) {
      Map.Entry e = (Map.Entry) itr.next();
      System.out.println("key: " + e.getKey() + " " + "value: " + e.getValue());
  }
  </code></pre>
  
  <p>I get:</p>
  
  <pre>
  key: 1 value: item1
  key: 2 value: item2
  key: 3 value: item3
  key: 4 value: item4
  </pre>
  
  <p>However, when I try to get a specific item by key</p>
  
  <pre><code>String item = items.get(1);
  </code></pre>
  
  <p>then I get a <code>null</code>. Based on the map's contents I should get <code>item1</code>. How is this caused and how can I solve it?</p>