Questions tagged [aura-id]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

How to set an input field value on change of checkbox [duplicate]

I'm trying to modify the field values using lightning:recordEditForm. I have one checkbox and one date time field. On change of the checkbox, current date time should be populated on to the date time ...
user avatar
  • 23
0 votes
1 answer
84 views

Use id in aura:iteration for recordEditForm

I have aura:iteration which goes through my custom wrapper class (which contains List of sObjects), and show recordEditFrom for all of them. My wrapper does not have an Id field. However, it has a key ...
user avatar
0 votes
0 answers
36 views

Please help!! How to get a field to throw error using name attribute not id attribute from lightning input

I am new to sfdc, Please ignore if any mistake. I want to get the field so that I can add an error to it using setCustomValidity function. ‹lightning: input onchange="(c.handlePowerUpdate)"...
user avatar
0 votes
2 answers
1k views

Passing Data from Child to Parent in Aura

I am trying to open a modal once clicking on a button which is in the parent component. For that I have used aura:method in the child component and calling that child component in the parent component ...
user avatar
0 votes
1 answer
58 views

Component.find() not working within if block

I'm trying to change the selectedTabId of a tab item in aura and the component.find() is returning null, I think it has something to do with the tabs being within an aura:if block but i'm not sure. ...
user avatar
0 votes
1 answer
187 views

aura:id is coming to be undefined for the first row in table

first error is -> Action failed: c:xyz_Cmp$controller$onKeyUp [Cannot read property 'get' of undefined] Failing descriptor: {c:xyz$controller$onKeyUp} second error is -> Action failed: c:xyz_Cmp$...
user avatar
0 votes
1 answer
767 views

Cannot read property 'get' of undefined. May i know if there are any trouble shooting points

I have mentioned everything correct, but still i am facing the issue, may i know if there are any trouble shooting points. Code: Component: <lightning:combobox name="Select Instance:" ...
user avatar
0 votes
1 answer
158 views

Aura - load boolean field value into toggle on doInit not working

I'm trying to take the boolean value of a checkbox field and load it into a toggle via the doInit but it's not working. Am I doing something wrong? When I debug it says osiValue is undefined Happy ...
user avatar
  • 616
0 votes
1 answer
31 views

On click of check box i am trying to display some text onpage (Using lighting componets for same)

I am trying to display some text on Page by using Lighting componets.i am not getting that text on click on check box Below is my code .Let mek nwo where is my code wrong. A>Component attribute ...
user avatar
  • 21
-1 votes
1 answer
559 views

Setting of value to <ui:inputText ,based on aura:id

I want to set the value based on key,using aura:id Component: ...
user avatar
0 votes
2 answers
169 views

count the ocurances of a value in a list at js controller lightning

Below is my list, and i would like to count the string and keep it in map count==>["Vendor Master","Vendor Master","Customer Master","Customer Master","Customer Master","Customer Master","Material ...
user avatar
-2 votes
2 answers
2k views

Not able to set value using aura:id ,in aura:iteration

Aura Code: <aura:iteration items="{!v.O2CSubprocess}" var="mapKey" indexVar="key"> <aura:iteration items="{!mapKey.value}" var="mapValue" indexVar="index"> <label ...
user avatar
0 votes
1 answer
105 views

Creating dynamic component with buttons, events not getting raised

I have created dynamic component but somehow the event is not getting generated : $A.createComponent( "aura:unescapedHtml", { "value": '<div class="slds-notify_toast slds-theme_default"...
user avatar
0 votes
2 answers
166 views

Input field not getting populated when selecting multiple records in a table as aura:id does not support dynamic id

I have a component which will display a list of records in the table format, and here I have a pick-list input field named Distance . Now on entering value in distance field and saving the record, ...
user avatar
1 vote
1 answer
771 views

How to find a dynamically assigned aura:id?

I'm looking for getting a dynamically assigned Aura:id. Below is my attempt to read it in Lightning:recordEditForm. Component markup: <aura:component > <aura:handler name="init" value="{...
user avatar
4 votes
2 answers
9k views

How to migrate aura:id to Lightning Web Components

How do I migrate a <div aura:id="foo"></div> from Aura to LWC when I use Aura Id for finding? cmp.find("foo");
user avatar
1 vote
1 answer
3k views

document.getElementById("myId") vs component.find("myId").getElement();

What is better to use document.getElementById("myId") or component.find("myId").getElement(); in terms of performance? What will be faster?
user avatar
  • 103
0 votes
1 answer
1k views

Lightning Input inside aura iteration

I have a situation where i have multiple lightning:inputs written inside aura:iteration. I JS controller i am trying to find the input by using Component.find(),but i came to know component.find will ...
user avatar
1 vote
2 answers
2k views

How to find id of lightning component tag which defined in iteration?

<aura:iteration items="{!v.List}" var="item" indexVar="i"> <div id="{!v.globalId + '_option'}" data-index="{!i}" data-id="{!item.Id}" onclick="{!c.jsFunction}"><text-...
user avatar
1 vote
3 answers
334 views

How can I move my spinner into a separate Lightning Component?

I have a lightning component which includes a spinner rendered by this code: <aura:component access="global" controller="SomeAuraController" implements="flexipage:availableForRecordHome,...
user avatar
0 votes
1 answer
1k views

Two aura:id for one lightning component. Is it possible?

Is it possible to have two aura:id for one lightning component? I am feeling that I have an x-y problem, but I can not think any other solution her. So, let me explain the issue. In a nutshell I have ...
user avatar
  • 1,107
1 vote
2 answers
12k views

Show/Hide Multiple Div on basis of Aura:ID in Lightning?

I have Lightning Component and I want to Show/Hide Multiple Div using Aura:ID. Currently, am doing this: Lightning Component <div class="chat_invitation" id=""> <div class="chat-...
user avatar
1 vote
1 answer
1k views

Set lightning component aura:id attribute dynamically while creating the component

Is it possible to set lightning component aura:id attribute dynamically while creating the component? Here is my code for the component creation: $A.createComponent( "c:...
user avatar
1 vote
2 answers
3k views

Aura Iterate, get the aura:id of a span

I'm trying to get the ID of an element that is in a loop to trigger an event, but I can't get the ID nor content of the tag. I've done something similar on visual force pages, but I did it ...
user avatar
  • 313
0 votes
1 answer
40 views

Uncaught Action failed: parent versus child Components [closed]

My Parent Component <lightning:button onclick="{!c.editProductGenerationGrid}" disabled="{!v.disablebutton}" variant="brand" aura:id="Edit1" label="Edit" /> <lightning:button onclick="{...
user avatar
  • 1,095
0 votes
1 answer
1k views

Get data from inner component present inside aura iteration in parent component

I want to get data from child component in parent component, child component is present inside inside auar:iteration in parent component and elements are rendered in child component using aura:if. I ...
user avatar
1 vote
1 answer
1k views

find() elements in {!v.body}

I'm rendering components in the body of another component: <c:test> <input type="text" aura:id="fooBar" /> </c:test> In this c:test component I'm trying to access the inner ...
user avatar
  • 6,100
0 votes
0 answers
531 views

Deployment of lightning components using eclipse

I have tried moving lightning components and applcn from one sandbox to other. using option deploy to server but it fails. I have added package.xml file * AuraDefinitionBundle ...
user avatar
  • 163
3 votes
1 answer
472 views

Component.find(namespace:componentName) : Finding Component By Type [duplicate]

I know that component.find(AURA:ID_VALUE); will work, but does anyone know if there is a way to do a find by type instead of id? What I am referring to would look similar to component.find("ui:...
user avatar
  • 406
4 votes
1 answer
740 views

Lightning Components: declare attributes or get the values from the DOM?

The question is fairly simple, but I haven't found any answers on the web. At the moment I have found two ways of getting the UI's values: Setting up an <aura:attribute type='Object' name='myName'...
user avatar
3 votes
1 answer
7k views

get values in lightning:input with $A.createComponents

I have worked simple things with lightning components I am trying to make things more complex but with lockservices I see that everything is more difficult because I can not access the DOM For ...
user avatar
0 votes
1 answer
614 views

How can I locate a ui:inputCheckbox?

hopefully this will be an easy one. I'm iterating through a list to populate a table, and I want to have checkboxes on the table too. I also want to be able to locate the previously chosen checkbox ...
user avatar
2 votes
1 answer
2k views

Target an element with aura:id for CSS

Can I use the aura:id attribute to target an element for styling? If so, is better to use aura:id instead id?
user avatar
  • 1,379
3 votes
1 answer
1k views

In Lightning/Aura, is it possible to dynamically set the id for ui:inputText and ui:InputSecret?

I'm currently trying to refactor the Discover Lightning Actions source code into something which wouldn't make my eyes bleed on a professional project. Most especially, I wish to reduce all the ...
user avatar
2 votes
1 answer
1k views

Workaround for static aura:id's on Lightning components

So please bear with me, I am a Lightning n00b... So I am trying to build a Lightning component which will implement a two-level foldable tree based on data in my SF instance. The way I have ...
user avatar
  • 63
2 votes
2 answers
13k views

Getting selected values in aura:iteration

I have a problem to retrieve some values within some picklists. Here is my code of the lightning component: <div class="c-container"> <lightning:layout horizontalAlign="space"> ...
user avatar
  • 1,379
15 votes
3 answers
5k views

Dynamically created component with aura:id, set as a Facet inside a parent component, is not found when calling find() and passing in aura:id

I would have expected that when a dynamically created lightning component is assigned as another component's attribute of type Aura.Component[], also referencing it in the parent component's markup ...
user avatar
11 votes
2 answers
5k views

Problems "find"ing a dynamically created child component

I'm just getting started working with dynamically creating child components and am having problems "find"ing them to do things like calling a method in them. If the component is created statically in ...
user avatar
  • 1,413
8 votes
5 answers
8k views

Aura:Id of dynamically created compontns cannot be accessed

Below is my code to create the component dynamically - The component is "ui:inputselect" $A.createComponent( RecoveryLineItem.Attributes[i].name,{ "class" : "slds-input ", ...
user avatar
3 votes
1 answer
2k views

<ui:inputText /> cannot get aura:id

I have the following input in my component: <ui:inputNumber class="slds-input" aura:id="thisInput" value="{!v.thisVal}" change="{!c.inputChange}"/> which calls the following controller: ...
user avatar
  • 1,913
1 vote
1 answer
3k views

Lightning Component: Retrieve values from dynamic forms

I have a list of records and an accordion style form for each record: this is achieved with aura:iteration and few <tr> tags. I've used the indexVar on aura:iteration to uniquely identify ...
user avatar
  • 1,913