When you clear indicator, it clears text, tip and other parameters of indicator.
To save indicator parameters you should use
saveIndicator method. which saves it by default to the
_indicators.default object of the TextField so you can have as many indicator config as you wish. You can use the saved value when you want to show the indicator.
var btn = mainContainer.add({
itemId: 'btn',
xtype: 'button',
x: 10,
y: 20,
width: 150,
text: 'clear Indicator',
listeners: {
click: {
fn: function (item) {
var me = this;
txtCPF.saveIndicator();
txtCPF.clearIndicator();
}
}
}
});
var btn = mainContainer.add({
itemId: 'btn',
xtype: 'button',
x: 10,
y: 80,
width: 150,
text: 'show Indicator',
listeners: {
click: {
fn: function (item) {
var me = this;
txtCPF.showIndicator(txtCPF._indicators.default);
}
}
}
});