List of List in VisualForce

    // VF Page 
<apex:repeat value="{!MyTrows}" var="rows">
        <apex:repeat value="{!MyTcols}" var="cols">
            <apex:outputText value="{!MyT[rows][cols]}" />
        </apex:repeat>
     </apex:repeat>



//Controller

public List> MyT{
get{
List a=new List{'a','b','c'};
List b=new List{'d','e','f'};
List> ab=new List>{a,b};
return ab;
}
set;

}

public List MyTcols{
get{
return new List{0, 1, 2};
}
set;
}

public List MyTrows{
get{
return new List{0, 1};
}
set;
}

Comments

Popular posts from this blog

Updating SourceData/ Data Source of the Pivot Table

Salesforce.com migration tool - Deploying Weblink and migrating files with special characters

Information Architecture - Setup your term store to scale