You need to sign in to do that
Don't have an account?
Priyesh Misquith 12
passing map values from apex to vf component
I need help on the following scenario
I have map Map<Id , list<sObject>> getMymap()
which returns data in followig format.
I want to pass this data to visualforce component and populate the populate in the table.
(this Key does not belong to account but these are the common id in CustomObject1__r.a71w0000000bnoJAAY and CustomObject2__r.Field5__c)
I have map Map<Id , list<sObject>> getMymap()
which returns data in followig format.
{a71w0000000bnoJAAY=(CustomObject1__c:{Id=aGY3L00000000UOWAY, field1__c=Hurray, Field2__c=Hello, Field3__c=a71w0000000bnoJAAY, CurrencyIsoCode=USD}, CustomObject2__c:{Id=a6W3L0000006CFlUAM, Field4__c=a6a3L000000008xQAA, Field5__c=a71w0000000bnoJAAY, Field6__c=Salesforce, Field7__c=2, Field8__c=59.00, Field9__c=118.00, Field10__c=EUR}), a71w0000000bnoMAAY=(CustomObject1__c:{Id=aGY3L00000000GsWAI, field1__c=Hurray, Field2__c=Hello, Field3__c=a71w0000000bnoMAAY, CurrencyIsoCode=USD}, CustomObject2__c:{Id=a6W3L0000005CFkUAM, Field4__c=a6a3L000000008xQAA, Field5__c=a71w0000000bnoMAAY, Field6__c=Visualforce, Field8__c=2, ccrz__Price__c=95.00, Field9__c=190.00, Field10__c=EUR})} I have the apex page. <apex:page controller="Account" extensions="otherclass1"> < c:someComponent /> </apex:page>
I want to pass this data to visualforce component and populate the populate in the table.
(this Key does not belong to account but these are the common id in CustomObject1__r.a71w0000000bnoJAAY and CustomObject2__r.Field5__c)
You need to do some modification in your vf component .
I am creating one column table with data, if you need more columns you can add more td and bind more fields Hope this helps!
I am getting below error Wrong type for attribute <c:someComponent mapOfData="{!mainMap}">. Expected Map, found Map<Id,List<SObject>>