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:attribute name="selectOptions" type="object[]" description="A list of objects with value (ID) and text (label) attributes"/> | |
<aura:attribute name="selectedOption" type="ID" default="" description="The value of the selected option"/> | |
<lightning:select name="selectName" label="My Select" value="{!v.selectedOption}" onchange="{!c.doSomething}" required="true"> | |
<aura:iteration items="{!v.selectOptions}" var="option"> | |
<option value="{!option.value}" selected="{!if(v.selectedOption==option.value,'selected','')}">{!option.text}</option> | |
</aura:iteration> | |
</lightning:select> |
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
<!-- Component Markup --> | |
<div aura:id="yourIdentifier"> | |
<c:Your_Component /> | |
</div> | |
/** | |
* Controller Method | |
*/ | |
showComponent : function (component, event, helper) { | |
$A.util.removeClass(component.find("yourIdentifier"), "slds-hide"); |
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:attribute name="testBoolean" type="Boolean" default="false" /> | |
<lightning:input name="testBoolean" label="Test Boolean" type="checkbox" checked="{!v.testBoolean}" /> |
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
<span class="slds-wizard__progress" style="z-index: 0;"> | |
<span class="slds-wizard__progress-bar" style="width:50%;"></span> | |
</span> |
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
//https://developer.salesforce.com/page/Lightning_Security#Access_Control_in_Apex_Controllers_and_Supporting_Classes | |
List<String> fields = new List<string>(); // Add your fields to check here | |
String objectName = ''; //Add your object name here | |
Map<String,Schema.SObjectField> fieldMap = Schema.getGlobalDescribe().get(objectName).getDescribe().fields.getMap() | |
for (String fieldToCheck : fields) { | |
// Check if the user has access to view field | |
if (!fieldMap.get(fieldToCheck).getDescribe().isAccessible()) { | |
//also pass error to client | |
throw new System.NoAccessException(); |
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
outputProxy : function(record) { | |
var obj = {}; | |
for(var propt in record) { | |
obj[propt] = record[propt]; | |
if (typeof(record[propt]) == 'object') { | |
obj[propt] = this.outputProxy(record[propt]); | |
} | |
} | |
return obj; | |
} |
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
window.location.pathname |
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
/* Cancel Scheduled Jobs in Apex */ | |
for(CronTrigger delCron: [SELECT Id FROM CronTrigger ]) { | |
System.abortJob(delCron.Id); | |
} |
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
/* YourDuino Example: Find Address of a DS18B20 Temperature Sensor | |
Cut and paste the address to a text file for later use. | |
V1.1 01/17/2013 | |
Questions: terry@yourduino.com | |
URL: http://arduino-info.wikispaces.com/Brick-Temperature-DS18B20#Read%20individual | |
Connections: | |
DS18B20 Pinout (Left to Right, pins down, flat side toward you) | |
- Left = Ground | |
- Center = Signal (Pin 2): (with 3.3K to 4.7K resistor to +5 or 3.3 ) |
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:component implements="flexipage:availableForAllPageTypes"> | |
<aura:attribute name="myString" type="string" default="{!if(false, 'Default Val', 'Other Default')}"/> | |
<aura:attribute name="mySimpleString" type="string" default="Default Val"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<div class="slds-card"> | |
{!v.myString} <!-- Will always output 'Other Default', even if changed later by doInit --> | |
{!v.mySimpleString} <!-- Will be changed to 'Set Directly' by doInit --> | |
</div> | |
</aura:component> |
OlderNewer