Valid PDII Dumps shared by ExamDiscuss.com for Helping Passing PDII Exam! ExamDiscuss.com now offer the newest PDII exam dumps, the ExamDiscuss.com PDII exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PDII dumps with Test Engine here:
A company has a custom component that allows users to search for records of a certain object type by invoking an Apex Controller that returns a list of results based on the user's input. When the search is completed, a searchComplete event is fired, with the results put in a results attribute of the event. The component is designed to be used within other components and may appear on a single page more than once. What is the optimal code that should be added to fire the event when the search has completed?
Correct Answer: B
The correct code to fire the event when the search has completed in a Lightning component is option B. $A.get("e.c.searchComplete") is the syntax used to get the event, setParams is used to set the parameters, and fire is used to dispatch the event.References: Lightning Components Developer Guide - Firing Events
Recent Comments (The most recent comments are at the top.)
Since the event needs to communicate across multiple instances or components and possibly even unrelated components on the page, an application event is the right choice. Component events are limited to communication between a component and its parent, but an application event is broader and works across the application.
Johan007 - Mar 10, 2024
There is no Possiblity of having Ans as - B, because to pass params to event we use setParams() Ans should be option_A, if its Component Event OR option_D if it is Application event.
I will Go with option_A, as The component is designed to be used within other components and may appear on a single page more than once. So it sounds like Component events to be fired.
Pepe - Mar 07, 2024
Looks like this Aura code and the correct answer would be "A"
Recent Comments (The most recent comments are at the top.)
Correct Answer is D
should be A is correct answer
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_component_example.htm
I think the correct answer is D
Since the event needs to communicate across multiple instances or components and possibly even unrelated components on the page, an application event is the right choice. Component events are limited to communication between a component and its parent, but an application event is broader and works across the application.
There is no Possiblity of having Ans as - B, because to pass params to event we use setParams()
Ans should be option_A, if its Component Event OR
option_D if it is Application event.
I will Go with option_A, as The component is designed to be used within other components and may appear on a single page more than once. So it sounds like Component events to be fired.
Looks like this Aura code and the correct answer would be "A"