function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amateur1amateur1 

how to break list values in a row into single columns

hi i  have created a map like map<date__c,list<string>

 

now for every key i am getting list values but in visual force page the list is getting displayed in a colum way can i break the list into rows

Jia HuJia Hu

for example,....

 

Map<String, List<String>> amap = new Map<String, List<String>>{'a' => new String[]{'a1', 'a2', 'a3'}, 'b' => new String[]{'b1', 'b2', 'b3'} };
for(String str : amap.keySet()) {
List<String> alist = amap.get(str);
for(String str1:alist) {
System.debug(' --------- Key: ' + str + ' value : ' + str1 );
}
}

 

Output:

22:38:29.041 (41259000)|USER_DEBUG|[5]|DEBUG| --------- Key: b value : b1
22:38:29.041 (41297000)|USER_DEBUG|[5]|DEBUG| --------- Key: b value : b2
22:38:29.041 (41326000)|USER_DEBUG|[5]|DEBUG| --------- Key: b value : b3
22:38:29.041 (41399000)|USER_DEBUG|[5]|DEBUG| --------- Key: a value : a1
22:38:29.041 (41434000)|USER_DEBUG|[5]|DEBUG| --------- Key: a value : a2
22:38:29.041 (41463000)|USER_DEBUG|[5]|DEBUG| --------- Key: a value : a3