No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Finding Components by ID
You can retrieve a component by its ID in JavaScript code. For example, a component has a local ID of button1.
1swfobject.registerObject("clippy.codeblock-0", "9");<ui:button aura:id="button1" label="button1"/>
2You can find the button component by calling cmp.find("button1"), where cmp is a reference to the component containing the button. The find() function has one parameter, which is the local ID of a component within the markup.
You can also retrieve a component by its global ID if you already have a value for the component's globalId in your code.
1swfobject.registerObject("clippy.codeblock-1", "9");var comp = $A.getCmp(globalId);