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:event type="APPLICATION" description="Event template" > | |
<aura:attribute name="data" type="Object"/> | |
</aura:event> |
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:event type="APPLICATION" description="Event template" > | |
<aura:attribute name="data" type="Object"/> | |
</aura:event> |
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:event type="APPLICATION" description="Event template" > | |
<aura:attribute name="data" type="Object"/> | |
</aura:event> |
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
({ | |
initialize : function(component, event, helper) { | |
var action = component.get("c.getContacts"); | |
var self = this; | |
action.setCallback(this, function(a) { | |
var contacts = a.getReturnValue(); | |
component.set("v.contacts", contacts); | |
console.log('Contacts are loaded.'); | |
}); | |
$A.enqueueAction(action); |
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 with sharing class LightningOutExampleController { | |
@AuraEnabled | |
public static List<Contact> getContacts(){ | |
return [SELECT Id, Name From Contact ]; | |
} | |
} |
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="LightningOutExampleController"> | |
<aura:attribute name="contacts" type="Contact[]" default="[]"></aura:attribute> | |
<aura:handler name="init" value="{!this}" action="{!c.initialize}" /> | |
<aura:handler event="c:lightningAppEvent" action="{!c.lightningAppEventHandler}"/> | |
<aura:registerEvent name="lightningAppExternalEvent" type="c:lightningAppExternalEvent" /> | |
<aura:iteration items="{!v.contacts}" var="contact"> |
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
<apex:component > | |
<style> | |
body.wait, body.wait *{ | |
cursor: wait !important; | |
} | |
</style> | |
<script> | |
//overriding the default send function of XMLHttpRequest | |
function addXMLRequestCallback() { | |
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
<apex:page standardController="<Your custom/standard object api name>"> | |
<apex:detail subject="{!<Your custom/standard object api name>.Id}" relatedList="true" title="true"/> | |
</apex:page> | |
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
<apex:page > | |
<script> | |
if(confirm('Do you want to reload parent window by closing this child window?')){ | |
top.window.opener.reloadPage('/home/home.jsp'); | |
top.window.close(); | |
} | |
</script> | |
</apex:page> |
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
<apex:page sidebar="false" showHeader="false"> | |
<script> | |
window.open('/apex/ChildPage','name','height=450,width=1000,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); | |
function reloadPage(url){ | |
window.location=url; | |
} | |
</script> | |
</apex:page> |