This file contains hidden or 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) { | |
helper.getCases(component); | |
} | |
}) |
This file contains hidden or 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
({ | |
getCases : function(component) { | |
var action = component.get("c.GetRecentCases"); | |
var self = this; | |
action.setCallback(this, function(a) { | |
try | |
{ | |
var cases=a.getReturnValue(); | |
console.log('Result = ' + JSON.stringify(cases)); | |
component.set("v.cases", cases); |
This file contains hidden or 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 CasesController { | |
@AuraEnabled | |
public static List<Case> GetRecentCases() | |
{ | |
List<Case> cases=[select id, CaseNumber, Subject, CreatedDate, Status, Priority | |
from Case | |
order by CreatedDate desc | |
limit 5]; | |
return cases; | |
} |
This file contains hidden or 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 AccountController | |
{ | |
@AuraEnabled | |
public static List<Account> GetAccountNames() | |
{ | |
return [select id, Name from Account limit 10]; | |
} | |
@AuraEnabled | |
public static List<Account> GetAccountDetails(String idListJSONStr) |
This file contains hidden or 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
({ | |
init : function(cmp, ev) { | |
var action = cmp.get("c.GetAccountNames"); | |
action.setCallback(this, function(response) { | |
var state = response.getState(); | |
if (state === "SUCCESS") { | |
var accs=response.getReturnValue() | |
var wrappers=new Array(); | |
for (var idx=0; idx<accs.length; idx++) { |
This file contains hidden or 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) { | |
helper.init(component, event); | |
}, | |
getAccounts : function(component, event, helper) { | |
helper.getAccounts(component, event); | |
} | |
}) |
This file contains hidden or 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
.THIS .cell { | |
padding: 5px 5px 5px 5px; | |
} | |
.THIS .head { | |
padding: 5px 5px 5px 5px; | |
font-weight: bold; | |
} | |
.THIS.big { | |
font-size: 20px; | |
font-weight: bold; |
This file contains hidden or 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
/** ***************************************************************************** | |
* User Freezer | |
* | |
* Description: | |
* | |
* Apex controller for the Freeze Users Lightning Component. | |
* | |
* If you are the sort of person who likes reading code, BrightGen is the place | |
* for you - check out http://www.brightgen.com to see our latest vacancies. | |
* |
This file contains hidden or 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="UserFreezer"> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<aura:attribute name="UserDetails" type="Object" /> | |
<aura:attribute name="Message" type="String" /> | |
<table> | |
<tr> | |
<th>First Name</th> | |
<th>Last Name</th> | |
<th>Username</th> |
This file contains hidden or 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) { | |
helper.doInit(component, event); | |
}, | |
frozenChanged: function(component, event, helper) { | |
helper.updateCheckbox(component, event); | |
}, | |
applyChanges : function(component, event, helper) { | |
helper.applyChanges(component, helper); | |
} |