Tuesday, April 2, 2013

Visualforce : Using Maps in PageBlockTables...

So I had never used a Map in a PageBlockTable before. Today I did. I'll reference this Blog, since this is where I stumbled on the info. Harshesh's Blog Apparently the key is to use Value[var] to access the data in the map, within the visualforce pageblocktable. Here is an example:

     
            
           
     

if you are using a custom class in your controller or extension then it would look something like this:

Now, why would you want to do this? I'll give you a full blown example here. Let's say you want to do some work on the selected row and you need the whole rows data: ..will update later with this!