To enable or disable a textfield so that user can have only one textfield enabled to input data.
Explanation :
If their are two textfields : textfield1, textfield2. If user wishes to enter data in textfield1 then textfield2 should be disabled. In this scenario : User inputs the data in textfield1 and wishes that he wants to enter the input for textfield2 instead of textfield1 , then data should be cleared from textfield1 and it should be disabled and textfield2 should be enabled.
Sample Code : I m not aware which event listeners to use to get this functionality.
{
xtype: 'textfield',
width: 215,
fieldLabel: 'Source1',
id: 'textfield1',
listeners: {
}
}, {
xtype: 'textfield',
id: 'textfield2',
width: 215,
fieldLabel: 'Source2',
listeners: {
}
}
Please help me out relove this issue.