You need to sign in to do that
Don't have an account?
iKnowSFDC
Displaying values from map in VF page
I'm trying to display some values in a data table and am getting the following error:
Incorrect parameter for subscript. Expected java.lang.Class, received Text
The VF code is as follows:
<apex:datatable value="{!bom}" var="cmps" width="650px" border=".5px"> <apex:column headerValue="Top Level Product" > <apex:outputField value="{!cmps.Top_Level_Product__c}"/> </apex:column> <apex:column headerValue="Top Level Product" > <apex:outputField value="{!cmps.Top_Level_Product__r.ProductCode}"/> </apex:column> <apex:column headerValue="Manufacturer's Part Number"> <apex:outputField value="{!cmps.Component__r.Product_Code__c}"/> </apex:column> <apex:column headerValue="Quantity" style="text-align:center;"> <apex:outputField value="{!pcQty[cmps.id]}"/> </apex:column> <apex:column headerValue="Description"> <apex:outputField value="{!cmps.Component__r.Component_Description__c}"/> </apex:column> </apex:datatable>
I am not sure how to solve this so that the quantity value in my map is displayed instead.
Thanks for your help.
JoAnn
Refer following link. This is a good example for dynamic Map binding from Bob
http://bobbuzzard.blogspot.com/2011/03/visualforce-dynamic-map-bindings.html
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
All Answers
Refer following link. This is a good example for dynamic Map binding from Bob
http://bobbuzzard.blogspot.com/2011/03/visualforce-dynamic-map-bindings.html
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.