public with sharing class TableController {
public List<yourType> firstColumn { get; set; }
public List<yourType> secondColumn { get; set; }
public TableController() {
// init your lists
}
}
page:
<apex:page controller="TableController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="2">
<apex:pageBlockSection columns="1" title="first">
<apex:repeat value="{!firstColumn}" var="first">
<!-- Show that you need -->
</apex:repeat>
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" title="second">
<apex:repeat value="{!secondColumn}" var="second">
<!-- Show that you need -->
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Hi,
i'm assuming the lists are the same size if you want to display them in parallel.
Create an inner class in you controller/extension that looks something like this:
public class innerClass{
public string(?) valA{get;set;}
public string(?) valB{get;set;}
}
then do something like:
List<innerClass> lst = new List<innerClass>();
for(Integer i = 0;i < listA.size(); i++)
{
innerClass ic = new innerClass();
ic.valA = listA[i];
ic.valB = listB[i];
}
and in your VF page set the 'lst' of innerClass instances as your value.
if more elaboration is needed, feel free to ask.
Regards
I need some more elaboration regarding this. i am in a fix with this
Please do reply
Regards
Punnoosre
Try this:
controller:
page: