Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In controler i will get the data as "List < List < String>>" , how can i display it on Visual force page?

And that "List < List < String>>" is populated based on user input(Checkbox values).

If its just List then i could able to display them using datalist

List<String> alist;

then i can use this to display them

<apex:dataList value="{!alist}" var="c">{!c}


share|improve this question
up vote 5 down vote accepted

If you have a list of list "List < List < String>>" you will need to do something like :

<apex:repeat value="{!alist}" var="l">
    <apex:dataList value="{!l}" var="c">
share|improve this answer
I am getting this Error: Literal value is required for attribute var in <apex:dataList> for var="{!c}" – Akash Nidhi P S Apr 23 '14 at 5:51
This should read <apex:dataList value="{!l}" var="c"> – altius_rup Apr 23 '14 at 5:54
I updated my answer. @altius_rup, Thank you – brovasi Apr 23 '14 at 6:03

You can show list of list by any below approach

1) first approach

    <apex:repeat value="{!ListOfList}" var="List">
     <apex:repeat value="{!list}" var="item">

2) Second approach
     (this approach use when we are creating many tables on layout 
    <apex:repeat  value="{!ListOfList}" var="List">
     <apex:pageblocktable value="{!list}" var="item">
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.