I am having a map and want to expose it in the VF page and I did something like below
list<related_object__c> related_object_list =[select decimal_field__c from related_object__c limit 1];
Map<id,decimal> map_string_id = new map <id,string>();
for(opportunity o: [select id from opportunity where account!= null]{
for(related_object__c rel: related_object_list){
map_string_id.put(opp.id,rel.decimal_field__c); } }
The page :
<apex:page standardcontroller="opportunity">
<apex:form>
<apex:repeat value="{!opportunity}" var="opp">
<apex:outputtext value="{!map_string_id[opp]}"/>
</apex:repeat>
</apex:form>
</apex:page>
The problem is that the map may or may not contain the opportunityID based my query in the controller and gives me
Map key 006.... not found in map
Is there a way to check in the VF page if the map containsKey ? I want to see if there is any way I can do something like :
<apex:outputtext value="{!map_string_id[opp]}" rendered="**{!map_string_id.containsKey(opp)}**/>
Is this possible !!!!