I know how to enable the clicked button.
Lets say I want to enable all buttons on the click of a button.
The button is in a Lightning component as:
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
<aura:attribute name="msg" type="String"/>
<p>What happened: [<ui:outputText value="{!v.msg}"/>]</p>
<div>
<ui:button label="A"
press="{!c.disableMe}"/>
<ui:button label="B"
press="{!c.disableMe}"/>
<ui:button label="Enable them all!!!"
press="{!c.myClearButtonClicked}"/>
</div>
In my js controller:
myClearButtonClicked: function(component, event, helper) {
var btnClicked = event.getSource(); // the button I clicked
btnClicked.set("v.disabled",false); // Enable the button
component.set("v.msg", 'All buttons have been enabled'); // update message
// I want to enable all buttons in the page instead of the one I clicked
// How do I get a grip on those buttons from here ?
}