Lightning listbox selection styling

In the developer docs they have a really cool Listbox-looking thing where you select an item (with nice hover effects and everything) and then it changes the content of several other components. For example: You can select a different example and it changes the card next to the content and the card with the … Read more

Aura:if – check with a regular expression

Is it possible to write aura:if conditions with regular expressions. Ia m trying remove records if the a certain field in that record is not a number. <aura:if isTrue=”{! !add.sumchans__suiteNumber__c == ^[0-9]*\d$}”> Right now I am handling this in js controller. Pls advise! Answer No, doing this in the controller is the right way. There … Read more

AuraDefinitionBundle No APPLICATION named markup://

I’m facing yet another odd error when attempting to upload my managed package. It is throwing this AuraDefinitionBundle – InitialLinkingApp No APPLICATION named markup://[namespace_redacted]:InitialLinkingApp found That app definitely exists, and is in the package. Before this would only happen if we had a postInstall script defined but now it’s doing it even without the script. … Read more

How to change the value of disabled with aura:if?

I have a few text input fields and 1 lightning:input type=”file”: <lightning:input type=”file” name=”file” accept=”image/jpg” id=”photoFile” onchange=”{!c.handleFile}” disabled=”true”/> I have to change it to disabled=”false”, if all text input fields aren’t empty. How can I do this? Answer You wouldn’t use aura:if for this. Just set the value to an attribute: <aura:attribute name=”fileInputDisabled” type=”Boolean” default=”true” … Read more

Display image in salesforce lightning component

I have a contentversion file which I am using the following tag to view in my lightning component <img src=”/sfc/servlet.shepherd/version/download/0690w0000000IPS”/> However, it is downloading my file instead of displaying. Is there any way to just display instead of downloading? Answer You’re using the url for download. Instead, you want to use renditionDownload. It’s explained in … Read more

Change input value using javascript

I have an input in a form built with aura: <input class=” input uiInput uiInputText uiInput–default uiInput–input” type=”text” aria-describedby=”5284:0″ placeholder=”” id=”7:4790;a” data-aura-rendered-by=”17:4790;a” data-aura-class=”uiInput uiInputText uiInput–default uiInput–input” data-interactive-lib-uid=”54″ aria-required=”true”> I need to change the value of this input using javascript. However, when doing: document.getElementById(“7:4790;a”).value = “random value”; Visually, it changes the value in the input, but … Read more

lightning:buttonMenu issue z-index doesn’t work

I’ve created a lightning component which has a menu and this is how it opens: <table class=”slds-table slds-table_bordered selected-apps-table slds-table_fixed-layout”> <thead> <th class=”slds-text-title_caps” style=”width: 25%;”>App</th> <th class=”slds-text-title_caps”>Category</th> <th class=”slds-text-title_caps”>Rating</th> <th class=”slds-text-title_caps”>Status Demand</th> <th class=”slds-text-title_caps”>Status Supply</th> <th class=”slds-text-title_caps” style=”width: 5%;”></th> </thead> <tbody> <aura:iteration items=”{!dev.selectedApps}” var=”app”> <tr> <td class=”slds-truncate”><img src=”{!app.icon}” class=”app-icon”/><span class=”app-name”><a href=”#” target=”_blank”>{!}</a></span></td> <td class=”slds-truncate”>{!app.category}</td> <td … Read more

AccordianSection name property is dynamically not changed, leading to serious problem in iteration

Hi I am working on a problem where I have multiple records of an Object to be shown and each of these records, will have many child records of It’s Child Object. I have chosen AccordianSection to show parent record and A Table to show Children of each. Also, I need to provide New, Clone … Read more

Aura Component don’t catch event from another one

Lightning Event: tripEventer, attribute – trip, Trip__c Component Item: <aura:registerEvent name=”openTripEvent” type=”c:tripEventer”/> <lightning:button class=”slds-align_absolute-center” onclick=”{!c.openTripAction}” label=”Open Form”/><br/> Component Item Controller: openTripAction: function (component, event, helper) { var action = component.getEvent(‘openTripEvent’); action.setParam(‘trip’, component.get(“v.trip”));; alert(‘gree from item button’); } Component Form: <aura:attribute type=”String” name=”test” default=”nothing”/> <aura:handler name=”openTripEvent” action=”{!c.handleOpenForm}” event=”c:tripEventer”/> Component Form Controller: handleOpenForm: function (component, event, … Read more

@AuraEnabled methods and fields : field declared as @AuraEnabled not available in @AuraEnabled method

I am new to lightning and i have written a controller for the component. public class TScontroller{ @AuraEnabled public Case caseDetail {get;set;} . .// few @AuraEnabled variables declared as above . @AuraEnabled public static String getInitialValue(){ caseDetail=[select id,(Select Id, B Dose__c, Lot_Number__c, MD_Last_Name__c, MD_Title__c, MD_Address__c, MD_City__c, MD_State__c, MD_Zipcode__c, MD_Phone_Number__c, MD_Extension__c, Patient_date_Of_Birth__c, Patient_City__c, Patient_State__c, Case__c,Case__r. TSTestorder__c … Read more