You need to sign in to do that
Don't have an account?
Collen Mayer 6
Problem Displaying Apex Variable in VF page
Hello all,
I"m trying to use an apex variable in my visualforce page to keep a running total of a client's balance on a custom object. I'm getting a strange error "the value 'core.apexpages.el.adapters.RuntimeTypeMetadataElAdapter@75251df1' is not a valid number." I think it may have something to do with how I'm referring to the map field but can't figure out how to do it differently. I have verified that my controller is functioning properly, that records are populating, etc. I only get the error when trying to display the variable; if I delete the "OutputText" tag, the error goes away which seems strange to me.
Here's a trimmed down version of my Visualforce code that reproduces the error:
Collen
I"m trying to use an apex variable in my visualforce page to keep a running total of a client's balance on a custom object. I'm getting a strange error "the value 'core.apexpages.el.adapters.RuntimeTypeMetadataElAdapter@75251df1' is not a valid number." I think it may have something to do with how I'm referring to the map field but can't figure out how to do it differently. I have verified that my controller is functioning properly, that records are populating, etc. I only get the error when trying to display the variable; if I delete the "OutputText" tag, the error goes away which seems strange to me.
Here's a trimmed down version of my Visualforce code that reproduces the error:
<apex:page standardController="AECaseMgmt__Program_Case__c" extensions="Invoice" sidebar="false" showHeader="false" > <apex:repeat value="{!MapCasetoBilling}" var="Key"> <apex:variable value="{!0}" var="RunningBalance"/> <table> <apex:repeat value="{!MapCasetoBilling[Key]}" var="BillingItem"> <apex:variable value="{!0}" var="RunningBalance"/> <apex:variable var="RunningBalance" value="{!BillingItem['Amount_Credit_Debit__c']+RunningBalance}"/> <apex:outputText value="{!RunningBalance}"/><br/> </apex:repeat> </table> </apex:repeat> </apex:page>Thanks,
Collen
In your code, you used to varable inside repeat. Just try like below
Other thoughts?