Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Traverse a HashMap/Hashtable using a dataTable component in a JSF page

843844Apr 12 2008 — edited Apr 12 2008
I have a Hashtable in a managed bean, now I want to traverse this Hashtable and display it's keys and values in a JSF page using the dataTable component.

I was looking to do something like this:
<h:dataTable value="#{MyBean.myHashtable}" var="item">
	<h:column value="#{item.key}" />
	<h:column value="#{item.value}" />
</h:table>
However, when I run this page, it displays blanks instead of the keys and values of the Hashtable.

How can I get the dataTable (or even a panelGrid) to display the keys and values of the Hashtable on the JSF page ?

Any help or pointers will be appreciated!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2008
Added on Apr 12 2008
1 comment
549 views