This file contains 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 WizardDemoController { | |
public WizardDemoController getSelf() { | |
return this; | |
} | |
public String message { get; set; } | |
public Integer pageNumber { get; set; } | |
public WizardDemoController() { | |
pageNumber = 1; | |
} | |
public void nextPage() { |
This file contains 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
// Technical Note: We can't add any strings to the debug logs | |
// because strings go in to a "string pool", which affects | |
// heap size for each non-unique string. | |
// Base heap | |
System.debug(Limits.getHeapSize()); | |
// The "symbol table" has a new entry added, +0 heap | |
// i is defined, no value (heap does not change) | |
Integer i; |
This file contains 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 Code39Controller { | |
// Determines if the check digit should be generated | |
// If true, scanners must be enabled to use it | |
public Boolean shouldCheckDigit { get; set; } | |
// The source string to use. Currently only supports | |
// the characters in the "keys" string. Do not use '*'. | |
public String sourceCodeValue { get; set; } | |
// The index for supported characters. | |
static String keys = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*'; |
This file contains 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 AccountData { | |
@AuraEnabled public static Account[] getRecords() { | |
return [SELECT Name, ParentId, (SELECT Name FROM Contacts) FROM Account]; | |
} | |
} |
This file contains 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 controller="q292183"> | |
<aura:handler name="init" value="{!this}" action="{!c.init}" /> | |
<aura:attribute name="data" type="Map" /> | |
{!v.data.a} {!v.data.b} {!v.data.c} | |
<hr /> | |
<c:q292183lwc /> | |
</aura:application> |
This file contains 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 TreeNodeDataProvider { | |
@AuraEnabled public static User[] getUsers() { | |
return [SELECT Name, ManagerId, SmallPhotoUrl FROM User]; | |
} | |
} |
This file contains 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"> | |
<!-- All items added to the list --> | |
<aura:attribute name="data" type="List" default="[]" /> | |
<!-- The list of currently viewable items --> | |
<aura:attribute name="filteredData" type="List" default="[]" /> | |
<!-- Input for a new item --> | |
<aura:attribute name="newItem" type="String" /> | |
<!-- Input for the filter text --> | |
<aura:attribute name="filter" type="String" /> | |
This file contains 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" controller="AccountListFilterByCity"> | |
<aura:attribute name="cities" type="List" default="[]" /> | |
<aura:attribute name="allAccounts" type="List" default="[]" /> | |
<aura:attribute name="filterAccounts" type="List" default="[]" /> | |
<aura:handler name="init" value="{!this}" action="{!c.init}" /> | |
<lightning:layout> | |
<lightning:layoutItem size="3"> | |
<aura:iteration items="{!v.cities}" var="cityValue"> |
This file contains 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
namespace NumberGenerators { | |
public class UniqueNumberGenerator | |
{ | |
int value; | |
public UniqueNumberGenerator(int value) | |
{ | |
this.value = value; | |
} | |
public Nullable<int> NextId() |
This file contains 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 ServerSide50KPagination { | |
Id[] recordIds; | |
public Integer maxPage { get; set; } | |
public Integer pageNumber { get; set; } | |
public Integer pageSize { get; set; } | |
public Account[] records { get; set; } | |
public ServerSide50KPagination() { | |
recordIds = new Id[0]; | |
for(Account record: [SELECT Id FROM Account ORDER BY Name]) { |