title: How to access Map key in jsf datatable
body: <p>I'm getting the error <code>javax.el.PropertyNotFoundException: /member/apps/cms/edit.xhtml @228,49 value="#{props.key}": Property 'key' not found on type java.util.HashMap$Values</code> when trying to display the datatable below.</p>
  
  <pre><code>&lt;p:dataTable id="properties" var="props" value="#{contentEditorBacking.properties}" editable="true"&gt;
  
      &lt;p:column headerText="Property"&gt;
          &lt;p:cellEditor&gt;
              &lt;f:facet name="output"&gt; 
                  &lt;h:outputText value="#{props.key}" /&gt;
              &lt;/f:facet&gt;
              &lt;f:facet name="input"&gt;
                  &lt;h:inputText value="#{props.key}" /&gt;
              &lt;/f:facet&gt;
          &lt;/p:cellEditor&gt;
      &lt;/p:column&gt;
      &lt;p:column headerText="Value"&gt;
          &lt;p:cellEditor&gt;
                          &lt;f:facet name="output"&gt; 
                  &lt;h:outputText value="#{props.value}" /&gt;
              &lt;/f:facet&gt;
              &lt;f:facet name="input"&gt;
                  &lt;h:inputText value="#{props.value}" /&gt;
              &lt;/f:facet&gt;
          &lt;/p:cellEditor&gt;
      &lt;/p:column&gt;
  
      &lt;p:column headerText="Edit"&gt;
          &lt;p:rowEditor /&gt;
          &lt;!-- Need to put an update on here yet --&gt;
          &lt;p:commandLink styleClass="ui-icon ui-icon-trash" id="deleteProperty" actionListener="#{contentEditorBacking.deleteProperty}"&gt;
                   &lt;f:attribute name="key" value="#{props.key}" /&gt;
               &lt;/p:commandLink&gt;
      &lt;/p:column&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>Here's the relevant part of my contentEditorBacking:</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class ContentEditorBacking {
      private Map&lt;String, Properties&gt; properties = new LinkedHashMap&lt;String, Properties&gt;();
  
      public Collection&lt;Properties&gt; getProperties() throws Exception{
          return properties.values();
      }
  
      public static class Properties{
  
          private String key;
          private String value;
  
          public Properties(String key, String value) {
              super();
              this.key = key;
              this.value = value;
          }
  
          public String getKey() {
              return key;
          }
          public void setKey(String key) {
              this.key = key;
          }
          public String getValue() {
              return value;
          }
          public void setValue(String value) {
              this.value = value;
          }
          @Override
          public String toString() {
              return "key=" + key + ", value=" + value + "";
          }
  
      }
  }
  </code></pre>
  
  <p>How can i access the key value from my properties map?</p>