Monday, May 16, 2011

Using Map in Pageblock table in Visualforce pages

I was not aware that we can use Map in pageblock table in Visualforce pages.
Whenever I had came across something which had duplicate results then I used to prepare Map and then extract List as values from Map and return that List to Page Block Table.

Now after I came across this post then i came to know that Map can be used in Visualforce pages.
Just prepare the Map and return the Map. Use the Map in following ways in Page Block Table in VF page.

 <apex:pageBlockTable value="{!data}" var="d">  
<apex:column headerValue="Key Values">
<apex:column headerValue="Values">

refer original post at following link

No comments: