Dynamically generate h:column based on list of hashmaps
Is it possible to bind a List of HashMaps to the jsf component h:dataTable? That’s only possible if you generate the necessary <h:column> tags with a view build time tag such as JSTL <c:forEach>. Here’s a concrete kickoff example, assuming that your environment supports EL 2.2: <h:dataTable value=”#{bean.listOfMaps}” var=”map”> <c:forEach items=”#{bean.listOfMaps[0].keySet().toArray()}” var=”key”> <h:column> #{map[key]} </h:column> … Read more