This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
showListViewData : function(component, event, helper) { | |
var strValue = component.find("inputName").get("v.value"); | |
var setOptions = component.find("selectvalues"); | |
component.set("v.objName", strValue); | |
var action = component.get("c.fetchListViews"); | |
action.setParams({ | |
"strObjName" : strValue | |
}); | |
var optionValues = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
showData : function(component, event, helper) { | |
helper.showListViewData(component, event, helper); | |
}, | |
onListViewChange : function(component, event, helper) { | |
helper.showRecordsData(component, event, helper); | |
}, | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="ListViewController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" > | |
<aura:attribute name="objName" type="String" /> | |
<!--<aura:attribute name="objListView" type="String[]" />--> | |
<aura:attribute name="viewName" type="String" /> | |
<div class="slds-box slds-theme_default"> | |
<div class="slds-box"> | |
<lightning:input aura:id="inputName" type="text" label="Enter Object Name:" required="true" /> | |
<lightning:button variant="brand" label="Show List View" name="List View" onclick="{!c.showData}"/> | |
</div> | |
<br/><br/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component extensible="true"> | |
{!v.body} | |
</aura:component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/* | |
* This method will call the server side action and will execute callback method | |
* it will also show error if generated any | |
* @param component (required) - Calling component | |
* @param method (required) - Server side methos name | |
* @param callback (required) - Callback function to be executed on server response | |
* @param params (optional) - parameter values to pass to server | |
* @param setStorable(optional) - if true, action response will be stored in cache | |
* */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Exntends Base Component in Component Definition --> | |
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" | |
extends="c:Base" controller="AccountController" access="global" > | |
<aura:attribute name="data" type="Account[]"/> | |
<aura:handler name="init" action="{!c.doInit}" value="{!this}"/> | |
<aura:iteration items="{!v.data}" var="acc"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
doInit : function(component, event, helper) { | |
helper.getAllAccounts(component, helper); | |
}, | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
getAllAccounts : function(component, helper) { | |
//Calling base component's helper method to call Aura Method | |
helper.callServer(component, "c.getAccounts", | |
function(response){ | |
if(response){ | |
component.set("v.data", response); | |
//Calling showToast method of Base component | |
helper.showToast({ | |
"title": "SUCCESS", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AccountController { | |
@AuraEnabled | |
public static List<Account> getAccounts(){ | |
return [SELECT | |
Id, Name, Phone, Rating, My_Custom_Field__c, Active__c | |
FROM Account LIMIT 200]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:event type="COMPONENT" description="Capture streaming api event. Takes message object parameter"> | |
<aura:attribute name="message" type="Object" /> | |
</aura:event> |