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
Post a Comment
Feedback - positive or negative is welcome.