Can anyone please help me how to display the list values using a VF page.
Below is my controller comparison logic:
for(obj__c Type : subType)
{
for(obj__c gen : generalList)
{
if(Type.Sub_Type__c == gen.Sub_Type__c)
{
genValue = gen.sub_Type__c;
System.debug ('genValue -----------'+genValue);
}
}
}
genValue is a string which stores the list of sub_Type field values. now I wanted to display all the list values for every iteration of for loop using a vf page. I tried displaying as :
value="{!genValue}"
but as it is a string the page is displaying only one value.
Can anyone please help me display all the list values as long as the outer for loop iterates
Thanks in advance.
Best Answer
You should be able to use the
<apex:repeat>
tag to display your list values. From the help docs here, here is an example:Update: Try swapping out the variables in the above example with your list and values. Something like this should work: