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
@RestResource(urlMapping='/RestAPIDemo/*') | |
global class SK_RestAPIDemoController { | |
@HttpGet | |
global static List<Account> searchAccounts() { | |
String cName = RestContext.request.params.get('searchString'); | |
string searchName = '%' + cName + '%'; | |
List<Account> accList = new List<Account>(); | |
accList = [ Select ID, Name, Type,Industry, BillingCountry from Account where Name Like : searchName]; | |
return accList; | |
} |
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 > | |
<aura:attribute name="displayedSection" type="string" default=""/> | |
<div> | |
<b> This component is going to explain aura:if tag functionality</b> | |
</div> | |
<lightning:button label="Display Section 1" variant="brand" onclick="{!c.displaySection1}"/> | |
<lightning:button label="Display Section 2" variant="brand" onclick="{!c.displaySection2}"/> | |
<aura:if isTrue="{!v.displayedSection == 'section1'}"> | |
<div aura:id="firstsection"> | |
<lightning:input type="text" label="Section 1 input" name="sec1" |
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 > | |
<aura:attribute name="displayedSection" type="string" default=""/> | |
<div> | |
<b> This component is going to explain div slds show-hide functionality</b> | |
</div> | |
<lightning:button label="Display Section 1" variant="brand" onclick="{!c.displaySection1}"/> | |
<lightning:button label="Display Section 2" variant="brand" onclick="{!c.displaySection2}"/> | |
<div aura:id="firstsection" class="{!if(v.displayedSection == 'section1','slds-show','slds-hide')}"> | |
<div> | |
<b> First Div Section</b> |
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:application extends="force:slds"> | |
<c:SK_LightningTreeCmp ltngcurrentRecId="0019000000ld4kO" | |
ltngSobjectname="Account" | |
ltngParentFieldAPIName="ParentId" | |
ltngLabelFieldAPIName="Name" | |
ltngHierarchyHeader="Account Hierarchy"/> | |
<c:SK_LightningTreeCmp ltngcurrentRecId="5009000000GJkJG" | |
ltngSobjectname="Case" |
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="SK_DemoSF1EventsCmpController" implements="force:appHostable" > | |
<aura:attribute name="recList" type="List" /> | |
<aura:attribute name="menu" type="List" default="View,Edit" description="Optional Menu Items"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<aura:handler event="aura:waiting" action="{!c.showSpinner}"/> | |
<aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/> | |
<div class="slds-align--absolute-center"> | |
<lightning:spinner aura:id="spinner" variant="brand" size="large" class="slds=hide"/> | |
</div> |
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
<apex:page sidebar="false" standardStylesheets="false" docType="html-5.0" id="sk" showHeader="false"> | |
<head> | |
<apex:slds /> | |
</head> | |
<body class="slds-scope"> | |
<div class="slds-grid slds-wrap" id="fileSelectionPopUpDiv"> | |
<div class="slds-col slds-size--1-of-1 slds-small-size--1-of-2 slds-medium-size--1-of-2 slds-col"> | |
<div class="slds-align_absolute-center"> |
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="SK_ChartJsCmpController"> | |
<aura:attribute name="ltngChartData" type="Object"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<div class="slds-grid slds-wrap"> | |
<div class="slds-size--1-of-1 slds-medium-size--1-of-1 slds-large-size--1-of-1" > | |
<div class="slds-card__body slds-card__body_inner" aura:id="lineChartSection"/> | |
</div> | |
<div class="slds-size--1-of-1 slds-medium-size--1-of-1 slds-large-size--1-of-1" > | |
<div class="slds-card__body slds-card__body_inner" aura:id="horrizontalBarChartSection"/> |
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:application extends="force:slds"> | |
<c:SK_DataTableFreezeHeaderDemoCmp /> | |
</aura:application> |
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 SK_WrapperSortUtility { | |
//We will sort wrapper list based on count value | |
//using bubble sort | |
public static List<SK_sortUtilityTestWrapper> sortWrapperList(List<SK_sortUtilityTestWrapper> recList,string sortType){ | |
List<SK_sortUtilityTestWrapper> sortedList = new List<SK_sortUtilityTestWrapper>(); | |
system.debug('******sortedList before sorting in '+sortType+':'+recList); | |
if(recList.size()>0){ | |
sortedList = recList; | |
if(sortType.equalsIgnoreCase('DESC')){ |
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 SK_sortUtilityTestWrapper implements Comparable{ | |
public string category{get;set;} | |
public decimal count{get;set;} | |
public SK_sortUtilityTestWrapper(string ss,decimal sk){ | |
this.category=ss; | |
this.count=sk; | |
} | |
// Compare wrapper based on the count value. | |
public Integer compareTo(Object compareTo) { |