I have a req. to map The URL that is stored in the field which holds the url of the image in the documents. In VF page I reference the field that will hold the url from the documents. So I created a Map Controller :
public List<List<String>> IORefFormatedDescriptions {get;set;}
IORefFormatedDescriptions = new List<List<String>>();
Map<String,String> urlMap = new Map<String,String>();
NewsXtendIORef__c[] campEles = [Select id, Name, Campaign_Element__c, Details__c, Quantity__c, Display_Order__c, URL__c FROM NewsXtendIORef__c WHERE Campaign_Element__c In: IORefFormatedDescriptions];
for(NewsXtendIORef__c eleId : campEles){
urlMap.put(eleId,'');
if(eleId.URL__c != null){
urlMap.put(eleId, eleId.URL__c);
}
}
VF page :
<apex:variable var="i" value="{!0}" />
<apex:repeat value="{!IORefFormatedDescriptions}" var="row">
<tr style="font-size:14px;background-color:#B0C4DE;">
<apex:repeat value="{!row}" var="column">
<td>{!column}
<apex:variable var="i" value="{!i+1}"/>
<apex:outputPanel rendered="{!IF((mod(i,2)) == 0,false,true)}" style="text-align:center;" ><br></br>
<img src="{!urlMap[column]}" style="width:10px; height:20px; align:middle;" />
</apex:outputPanel>
</td>
</apex:repeat>
</tr>
</apex:repeat>
But I am getting the error because IORefFormatedDescriptions is List<List<String>>
. How Can I iterate over this?