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 > | |
| <aura:attribute name="options" type="list" default="[{'label':'Amit',value:'amit'},{'label':'Bagesh','value':'bagesh'},{'label':'Harman','value':'harman'}]"/> | |
| <lightning:comboBox name="Name" label="choose Name" value="amit" placeholder="Select an Option" options="{! v.options }" onchange="{! c.handleChange }"/> | |
| </aura: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
| ({ | |
| handleUploadFinished: function (cmp, event) { | |
| var uploadedFiles = event.getParam("files"); | |
| alert("Total Files uploaded : " + uploadedFiles.length); | |
| } | |
| }) |
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 implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global"> | |
| <aura:attribute name="accept" type="List" default="['.jpg', '.jpeg','.png']"/> | |
| <aura:attribute name="multiple" type="Boolean" default="true"/> | |
| <aura:attribute name="disabled" type="Boolean" default="false"/> | |
| <aura:attribute name="recordId" type="Id"/> | |
| <lightning:fileUpload name="fileUploader" | |
| label= "Upload image" | |
| multiple="{!v.multiple}" | |
| accept="{!v.accept}" | |
| disabled="{!v.disabled}" |
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
| ({ | |
| getData : function(cmp) { | |
| var action = cmp.get('c.getContacts'); | |
| var recordId=cmp.get('v.recordId'); | |
| action.setParams({recordId:recordId}); | |
| action.setCallback(this, $A.getCallback(function (response) { | |
| var state = response.getState(); | |
| if (state === "SUCCESS") { | |
| //console.log(JSON.stringify(response.getReturnValue())); | |
| cmp.set('v.myData', response.getReturnValue()); |
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, event, helper) { | |
| cmp.set('v.myColumns', [ | |
| { label: 'Contact Name', fieldName: 'Name', type: 'text',editable: true}, | |
| { label: 'Phone', fieldName: 'Phone', type: 'phone',editable: true}, | |
| { label: 'Email', fieldName: 'Email', type: 'email',editable: true} | |
| ]); | |
| helper.getData(cmp); | |
| }, | |
| saveTable:function (cmp,event,helper) |
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="ContactRecordListApex" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global"> | |
| <aura:attribute name="myData" type="Object"/> | |
| <aura:attribute name="myColumns" type="List"/> | |
| <aura:attribute name="recordId" type="string"/> | |
| <aura:handler name="init" value="{!this}" action="{!c.init}"/> | |
| <lightning:datatable data="{! v.myData }" | |
| columns="{! v.myColumns }" | |
| keyField="Id" | |
| hideCheckboxColumn="false" | |
| aura:id="contactDatatable" |
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 ContactRecordListApex { | |
| /**-------------------- | |
| Purpose: get list of contact records | |
| -------------------------**/ | |
| @auraEnabled | |
| public static list<Contact> getContacts(String recordId) | |
| { | |
| List<Contact> contactList=[select name, FirstName,LastName,Email,Phone from Contact where accountId=:recordId]; | |
| return contactList; |
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 implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global"> | |
| <aura:attribute name="fieldsArray" type="String[]" | |
| default="['Name','Email','Phone','AccountId']" /> | |
| <aura:attribute name='recordId' type="Id" /> | |
| <lightning:recordForm aura:id="recordForm" | |
| recordId="{!v.recordId}" | |
| objectApiName="Contact" | |
| fields="{!v.fieldsArray}" |
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) { | |
| var id = component.get("v.pageReference").state.message; | |
| var toastEvent=$A.get('e.force:showToast'); | |
| toastEvent.setParams({ | |
| title:'Rendering page', | |
| message:id, | |
| key:'info_alt', | |
| type:'info', | |
| mode:'pester' |
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 implements="lightning:isUrlAddressable"> | |
| <aura:handler name="init" value="{!this}" action="{!c.doInIt}"/> | |
| <lightning:card iconName="standard:event" title="WebinarOverride component"> | |
| <lightning:formattedText class="slds-p-left_small" value="This is the target page"/> | |
| </lightning:card> | |
| <lightning:card/> | |
| </aura:component> |