480
{!d}
{!data[d]}
APEX CLASS:
public class TestMapController{
public map data {get;set;}
public TestMapController(){
data = new map();
for(Account acc: [Select Id, Name, (Select Id, Name, Email from Contacts), Phone from Account]){
integer count = data.get(acc.name);
if(count != null)
count++;
else
count = 1;
data.put(acc.name, count);
}
}
}
public map
public TestMapController(){
data = new map
for(Account acc: [Select Id, Name, (Select Id, Name, Email from Contacts), Phone from Account]){
integer count = data.get(acc.name);
if(count != null)
count++;
else
count = 1;
data.put(acc.name, count);
}
}
}
VisualForce Page:
{!d}
{!data[d]}