You need to sign in to do that
Don't have an account?
hanimi
Map key is not found
hi,
I am trying to display map values based on key in Visualforce page.
<apex:repeat value="{!ContractWrapperMap['Dental']}" var="c">
<apex:outputText value="{!c.Groupnum}"></apex:outputText>
</apex:repeat>
can anyone give solution.
Its urgent...
Add those values from map based on key in a list in apex and then use that list in the apex:repeat.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
1st Way : -
<apex:repeat value="ListofKeys" var="c">
<apex:outputText value="{!ContractWrapperMap[c]}"></apex:outputText>
</apex:repeat>
Here in controller you can build ListofKeys so we you can use that here easily.
2nd Way :-
<apex:repeat value="ContractWrapperMap" var="c">
<apex:outputText value="{!ContractWrapperMap[c]}"></apex:outputText>
</apex:repeat>
Here is no need of creating iist of Keys
Sandeep -- I learned something! I must have missed the ability of VF dynamic bindings to reference controller maps; now I see it in the doc under the section :
'Referencing Apex Maps and Lists'
Thank you