Questions tagged [aura-handler]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 views

How to detect list element data changes with “change” handlers?

Accordingly to the documentation, the special aura change handler can be used to detect when a value in one of the component's attributes changes. Everything is fine with attributes of type Boolean, ...
0
votes
0answers
13 views

The application event not working [duplicate]

I know what I am asking is a very basic example question. But I am trying to understand the application event using an example and it is not working. I tried to figure it out all by myself for a long ...
3
votes
1answer
485 views

Custom message in AuraHandledException: is it possible?

How about situations, when I haven't Exception (it's not try/catch), but I still need to send a custom error message to the toast? When I try to use throw new AuraHandledException('My custom msg here')...
0
votes
2answers
65 views

Why I can't see my error msg from apex in lightning component?

What is wrong here? I see only Error on toast. let toastEvent = $A.get("e.force:showToast"); action.setCallback(this,function(a){ let state = a.getState(); if(state == "...
0
votes
0answers
103 views

How to handle more than 50k records in lightning component

How can we handle more than 50k records without using any offset/pagination in lightning controller.We need to display more than 50k records in lightning component.Can any one has idea?
0
votes
0answers
590 views

Get Field Label dynamically with aura:changeValue in Lightning Component

My requirement is whenever a field is changed and is updated I need to get the field label and sent that in mail saying that the field is updated. Now by using <aura:valueChange> I was able to ...
2
votes
1answer
2k views

How to add listener for toast notifications?

I want to perform an action when a notification happens in my app. The toast event is raised by SFDC which means I do not have access to the calling code. I have tried adding a handler to the force:...
3
votes
1answer
445 views

AuraHandlerException - Exception handlers should preserve the original exception

We have SonarQube setup for our org to scan for code quality. One code issue I get when using AuraHandlerException is - When handling a caught exception, the original exception's message and stack ...
0
votes
0answers
284 views

Detecting Data Changes with Change Handlers

I am looking at this example in the Developer Guide, and I can't replicate this in my instance. What am I doing wrong? Here is a snippet. <!-- Lookup Attributes --> <aura:attribute name="...
-2
votes
1answer
802 views

How to cover the line throw new AuraHandledException in the last method on the AuxilioResidDetalhesAlterContratoCtrl to the test class?

How to cover the line if (minhaSolicitacao == null) { throw new AuraHandledException('Registro não encontrado'); in the last method on the AuxilioResidDetalhesAlterContratoCtrl to the ...
1
vote
1answer
363 views

Lightning: Detecting attribute changes after initial value

My problem is related with the 'change' event on a component attribute. I only want to execute a code after this attribute is initialized by the parent component. For example: <!-- CHILD ...
2
votes
1answer
915 views

How to handle an event in a child component that is fired from a dynamically created grandchild component?

I have a component that includes a child component. The child component has a button that fires showCustomModal on an overlayLibrary and the content is a dynamically created component. Component ...
1
vote
2answers
807 views

$A.get(“e.c:applicationEvent”) always returns undefined

I have no idea what's going wrong, so I'll just paste all the code I've got and let you share in the madness. Basically I want to fire an application event that takes the value from a lightning:input ...
10
votes
1answer
9k views

lightning:spinner solution that finally works (using custom events, not aura:waiting)

Lightning components without a working loading indicator are just not professional. Too bad that there is not code example out there that seems to work under real-world circumstances.Every blog out ...
3
votes
0answers
963 views

How do I get the old value of a select in Lightning?

I have an ui:inputSelect in a nested component, I want to know how to get the old value when you select another option. <ui:inputSelect aura:id="cboProducto" class="slds-select" change="{!c....
3
votes
1answer
744 views

Aura Iteration not detecting change event

I have a test setup, but i am unable to get it working. I have lightning page which shows Names of few accounts as an inputText using aura:iteration. I need to detect any change made by user on these ...
5
votes
1answer
3k views

How do I get the Lightning Component “destroy” system event to fire?

I have a fairly bog standard Lightning Component with markup like: <aura:component controller="MyController" implements="flexipage:availableForAllPageTypes,force:appHostable,force:hasRecordId,...
4
votes
1answer
443 views

Detect source of value change in Lightning Component

I've have this handler <aura:handler name="change" value="{!v.foo}" action="{!c.baz}"/> Is there a way to know whether the value was modified from button click (via component.set(), etc) ...