You need to sign in to do that
Don't have an account?
Unable to display combined Variables in MAP inside reapeat in Visual force page ?
Hi All,
I need to display a value from MAP<String,Decimal> in VF page. But i am refering two variables as a key in repeat like (Name +'-'+Product name). I am getting error in experrion..,
Here is my VF code:
<apex:pageBlockTable value="{!commProductAgentFinal}" var="r">
<apex:column value="{!r.name}">
<apex:facet name="header">Carrier Name</apex:facet>
</apex:column>
<apex:column value="{!r.Product__r.name}">
<apex:facet name="header">Product Name</apex:facet>
</apex:column>
<apex:column value="{!r.Option__c}">
<apex:facet name="header">Option</apex:facet>
</apex:column>
<apex:column value="{!r.Beginning_Age__c}">
<apex:facet name="header">Beg age</apex:facet>
</apex:column>
<apex:column value="{!r.Ending_Age__c}">
<apex:facet name="header">End age</apex:facet>
</apex:column>
<apex:column value="{!r.Beg_Face_Amount__c}">
<apex:facet name="header">Beg Face</apex:facet>
</apex:column>
<apex:column value="{!r.End_Face_Amount__c}">
<apex:facet name="header">End Face</apex:facet>
</apex:column>
<apex:column value="{!FinalMap[{!r.name}+{!r.Product__r.name}]}">
<apex:facet name="header">Total points</apex:facet>
</apex:column>
</apex:pageBlockTable>
Controller:
public Map<string,Decimal> FinalMap {get; set;}
Error:Map key r.name-r.Product__r.name not found in map
Can anyone help on this ?
<apex:column value="{!FinalMap['r.name-r.Product__r.name']}">
<apex:facet name="header">Total points</apex:facet>
</apex:column>
<apex:column value="{!FinalMap[r.name-r.Product__r.name]}">
<apex:facet name="header">Total points</apex:facet>
</apex:column>
Error: Error: Incorrect parameter type for operator '-'. Expected Number, Date, DateTime, received Text
It not works.
Thanks for your help.