1.Practical Salesforce Development Without Code: Building Declarative Solutions on the Salesforce Platform
Link to Buy – https://amzn.to/3PyZYyi
2.Becoming a Salesforce Certified Technical Architect
Link to Buy – https://amzn.to/42bMEHB
3.Salesforce for Beginners – Second Edition
Link to Buy – https://amzn.to/3PCijdV
Category: Uncategorized
Lightning: $A
$A is known as the Aura object. Aura object is top level object in javaScript framework code.
Usage of $A
// Find a component where you wan to apply the util var myAttr = component.find("myAttr"); $A.util.addClass(myAttr, "add-class");
Can be used with –
getBooleanValue
hasClass
isArray
isEmpty
isObject
isUndefined
isUndefinedOrNull
removeClass
toggleClass
More reference can be found on – https://na15.lightning.force.com/auradocs/reference.app
Lightning: Action Handlers
Action handlers are just JavaScript functions with a particular function signature.
Action handlers are also known as –
1. controller action
2. controller function
Declaring an Action Handler –
For example you have Action Handler named handleClick
handleClick: function(component, event, helper)
3 parameters that are part of this Action Handler are –
1. component – The component which called this Action Handler.
2. event – The event which caused this Action Handler to be called.
3. helper – the component’s helper, another JavaScript resource of reusable functions.
Lightning: Controller
Controller is a resource in lightning component bundle that holds the action handlers for that component.
Lightning: Attributes Data Types
Attributes of any lightning components support following data types –
1. Primitive Data Types ( remember as B DD DD ILS)
Boolean
Double
Date
Date Time
Decimal
Integer
Long
String
2. Standard and Custom Objects
3. List, Set, Map
4. Custom Apex Classes
5. Framework – specific types such as Aura.Component or Aura.Component[ ]