Skip to content

Instantly share code, notes, and snippets.

Avatar

Derrek Harrison dsharrison

View GitHub Profile
@dsharrison
dsharrison / UserRecordAccessDebug.page
Last active Dec 13, 2015
Controller and visualforce page to demonstrate missing records with UserRecordAccess query.
View UserRecordAccessDebug.page
<apex:page controller="UserRecordAccessDebugCtrl" showHeader="true" sidebar="true">
<!--
Load this page with a record in the 'id parameter as users with varying record access
-->
<apex:form>
<h2>User</h2>
<br />
<apex:selectList value="{!userId}" size="1">
<apex:selectOptions value="{!userOptions}" />
<apex:actionSupport event="onchange" rerender="debug" />
@dsharrison
dsharrison / lightningInputRepro.cmp
Last active Oct 9, 2016
A reduced test case for the issues with <lightning:input /> bindings
View lightningInputRepro.cmp
<aura:component implements="force:appHostable">
<!-- public attributes -->
<aura:attribute name="myObj" type="Account" default="{Name: '', Type: ''}" access="PUBLIC" />
<!-- body markup -->
<c:lightningInputReproFields record="{!v.myObj}" />
<lightning:button label="Update Object" onclick="{!c.updateObj}" />
<lightning:button label="Update Name" onclick="{!c.updateName}" />
@dsharrison
dsharrison / LSTestButton.cmp
Created Nov 30, 2016
Reduced test case for locker service dynamic component DOM access.
View LSTestButton.cmp
<aura:component implements="forceCommunity:availableForAllPageTypes" access="GLOBAL">
<!-- public attributes -->
<aura:attribute name="childCmp" type="Aura.Component" access="PUBLIC"/>
<!-- component event handlers -->
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<!-- markup -->
<div aura:id="view">
@dsharrison
dsharrison / TransferSession.page
Created Feb 27, 2017
Transfer custom cookies in a community between Lightning and Visualforce with Locker Service enabled.
View TransferSession.page
<apex:page showHeader="false" sidebar="false">
<!--
Replace <your_resource> with the name of the static resource with
your application files in it. This assumes that you are using a zipped static
resource with your javascript files in a 'js/' folder.
-->
<apex:includeScript value="{!URLFOR($Resource.<your_resource>, '/js/transfer-session.js')}" />
</apex:page>
View TestCookieTransfer.page
<apex:page controller="KGRenewal.ECommerceCartController" showHeader="true" sidebar="true">
{!eCommerceOrder.Name}
</apex:page>
View LightningOutRecordView.app
<aura:application extends="ltng:outApp" >
<aura:dependency resource="c:recordViewRepro" />
</aura:application>
@dsharrison
dsharrison / DummyController.cls
Last active Dec 13, 2017
Reproduction for Proxy behavior moving from non-locker component to locker component
View DummyController.cls
public class DummyController {
@auraEnabled
public static Boolean getFalse() {
return false;
}
}
@dsharrison
dsharrison / MyOverrideClass.cls
Last active Jan 23, 2018
Reproduction components for a Spring '18 issue with virtual classes and lightning
View MyOverrideClass.cls
public class MyOverrideClass extends MyVirtualClass {
@auraEnabled
public override String getName() {
return 'MyOverrideClass';
}
@auraEnabled
public override Object getObj() {
return 'Hello World';
You can’t perform that action at this time.