Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @AuraEnabled
- public static Map<String, List<sObject>> returnSObjectMap() {...}
- getsobjectMap : function(component) {
- var action = component.get("c.returnSObjectMap");
- action.setCallback(this, function(a) {
- if (a.getState() === "SUCCESS") {
- var sobjectFields = a.getReturnValue();
- var sobjectFieldsFinal = [];
- for (var key in sobjectFields) {
- sobjectFieldsFinal.push({value:sobjectFields[key], key:key});
- }
- component.set('v.sobjectsMap',sobjectFieldsFinal);
- } else if (a.getState() === "ERROR") {
- }
- });
- $A.enqueueAction(action);}
- ...
- <aura:attribute name="sobjectsMap" type="List"/>
- ...
- <aura:iteration items="{! v.sobjectsMap }" var="sobjectList" indexVar="key">
- <apex:iteration items="{! sobjectList }" var="sobject">
- ...
- </apex:iteration>
- </aura:iteration>
- <apex:iteration items="{! sobjectList }" var="sobject">
Add Comment
Please, Sign In to add comment