I have an object that represents a service provider. In that object I have this hashmap
private Map<MetaDataKeys, String> metaData;
The "MetaDatatKeys" is a enum that looks like this,
public enum MetaDataKeys {
PROVIDER_NAME, PROVIDER_CONTACT_NAME, PROVIDER_SERVICE_RADIUS;
}
I would like to display the hashmap key/value pairs in a datatable or similar for editing, something along the lines of,
<p:dataTable id="providerDatatable" var="infoMap" value="#{editUserBean.editUser.metaData}">
<p:column><h:outputText value="#{infoMap.key.metaData}"/></p:column>
<p:column><h:inputText value="#{infoMap.key.value}"/></p:column>
</p:dataTable>
In my backing bean "editUser" is the object that contains the map.
what is the best way to go about this? I have not been successful in even getting the table to render and populate with values. In searching most examples use a string or a primitive for the key.