Last active
December 13, 2017 21:22
-
-
Save dsharrison/56f1cc2d698398134a83295f7dc1230d to your computer and use it in GitHub Desktop.
Reproduction for Proxy behavior moving from non-locker component to locker component
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 controller="DummyController"> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<div class="slds-card"> | |
API version 39: | |
<c:apiProxyTest aura:id="proxyTest" /> | |
</div> | |
</aura:component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<apiVersion>39.0</apiVersion> | |
<description>Service consumer on API version 39</description> | |
</AuraDefinitionBundle> |
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
({ | |
doInit : function(component, event, helper) { | |
component.find('proxyTest').invoke({ | |
action: component.get('c.getFalse') | |
}); | |
} | |
}) |
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 controller="DummyController"> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<div class="slds-card"> | |
API version 41: | |
<c:apiProxyTest aura:id="proxyTest" /> | |
</div> | |
</aura:component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<apiVersion>41.0</apiVersion> | |
<description>Service consumer on API version 41</description> | |
</AuraDefinitionBundle> |
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
({ | |
doInit : function(component, event, helper) { | |
component.find('proxyTest').invoke({ | |
action: component.get('c.getFalse') | |
}); | |
} | |
}) |
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 access="PUBLIC"> | |
<aura:attribute name="filtered" type="Boolean" default="false" access="PRIVATE" description="True if the config parameter has been filtered (proxied)." /> | |
<aura:method name="invoke" action="{!c.invoke}"> | |
<aura:attribute name="config" type="Object" /> | |
</aura:method> | |
<span> | |
{!v.filtered} | |
</span> | |
</aura:component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<apiVersion>41.0</apiVersion> | |
<description>Service level component to retrieve </description> | |
</AuraDefinitionBundle> |
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
({ | |
invoke : function(component, event, helper) { | |
var args = event.getParam('arguments'); | |
console.log(args); | |
var action = args.config.action; | |
component.set('v.filtered', typeof action.setParams !== 'function'); | |
} | |
}) |
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="force:appHostable"> | |
<!-- note that on API version 39, the action parameter will be filtered --> | |
<c:apiProxyConsumer39 /> | |
<c:apiProxyConsumer41 /> | |
</aura:component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<apiVersion>41.0</apiVersion> | |
<description>Tab container for reproduction.</description> | |
</AuraDefinitionBundle> |
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 DummyController { | |
@auraEnabled | |
public static Boolean getFalse() { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment