Can I bind my h:dataTable/rich:dataTable with some Map? I found that h:dataTable can work only with List object and deleting in List can be very heavy.
Can I bind my h:dataTable/rich:dataTable with some Map? I found that h:dataTable can work
Share
Yes, that’s right. dataTable, ui:repeat and friends only work with Lists.
You can just add a managed bean method that puts map.keySet() or map.values() into a list depending on which you want to iterate over.
Typically when I want to iterate a map from a JSF view, I do something like
with managed bean property
or something like that.
Of course, this makes the most sense if you’re using something like
TreeMaporLinkedHashMapthat preserves ordering.