PDA

View Full Version : please help Ext.apply problem.



gevik
30 Oct 2009, 6:11 AM
Hi,

I have an Ext.Button. After some ajax request I would like to change the properties of that button. So I call:



var btn = Ext.getCmp('myButton');
Ext.apply(btn,{text: 'updated again'});


After running the code above, there is not change to the button at all.

Any ideas? What am I doing wrong here?

(My extjs version is 3.0)

Thanx.

30 Oct 2009, 7:02 AM
because you're setting a property. There are no property change listeners in javascript!


try btn.setText('updated again');

30 Oct 2009, 7:02 AM
To be honest, I think you need to take a step back and learn javascript more.