Hi I've been trying to figure this out on my own but haven't been able to get it to work. I have a map of a map Map<string,Map<String, list<Accounts>>> mapToAccounts
. The inner key is a string which represents an url while the outer key is just the name of the site. I am attempting to create a hyperlink which shows the name of the site and the destination is the inner key(which is an url). Something like this <apex:outputLink value="{!theAccountsOfSitesAndMaps[innerkey]}">{!outerKey}</apex:outputLink>
. Any suggestions will be great.
public Map<String,Map<String, list<Accounts>>> getTheAccountsOfSitesAndMaps() {
return maptoaccounts;
}
Just updated below with suggestions from sfdcfox and Eric but receiving a new error: Error is in expression '{!TheAccountsOfSitesAndMaps[outerKey][innerKey]}' in component in page
<apex:pageBlock >
<apex:repeat value="{!TheAccountsOfSitesAndMaps}" var="outerKey">
<apex:pageBlockTable value="{!TheAccountsOfSitesAndMaps}[outerKey]" var="innerKey">
<apex:repeat value="{!TheAccountsOfSitesAndMaps[outerKey][innerKey]}" var="account">
<apex:column headervalue="Sites" />
<apex:outputLink value="{!innerKey}">{!outerKey}</apex:outputLink>
</apex:repeat>
</apex:pageBlockTable>
</apex:repeat>
</apex:pageBlock>
TheAccountsOfSitesAndMaps
and one calledmapToAccounts
? Do you really have two separate map instances?