Search code examples
extjsextjs3

How to set the value in extjs 3.2


I am using extjs 3. And I have two textfield. I want to setvalue of first textarea in second. I am using

Ext.getCmp('firstText).getValue() by which I am getting value of first textarea. But when I am using setValue in second textarea then it failed. Setvalue is not function in extjs3. What is the alternate option I can use.

Thanks


Solution

  • You can set the value property of the field to set value.

    Ext.getCmp('secondText').value = Ext.getCmp('firstText').getValue();