Menu

Using a Map instead of a List

Help
mt_struts
2005-10-18
2012-10-09
  • mt_struts

    mt_struts - 2005-10-18

    The docs for displaytag say that I can use a Map as a datasource instead of a List. However, I'm trying just that and not seeing keys and values in the map displayed.

    The tag does know that I have 3 pairs in my Map, so 3 rows are output. How can I indicate in the <display:column> attributes that it should dispaly the keys in one column and the values in the other?

    Thanks!

     
    • mt_struts

      mt_struts - 2005-10-18

      I have solved my problem. I'm now passing the display tag the Set of Map.Entries in the map, so that I can access the "key" and "value" pairs as properties.

       

Log in to post a comment.