LostCode
LostCode

Reputation: 533

Extjs's Panel's Item not change

I'm Student with Extjs4.

First, Please read this code.. This is my Panel's Item.

var propertyItem = [{
        xtype : 'textfield',
        fieldLabel : 'Name',
        name : 'objectName',
        width : 380,
        margin : '5 0 0 10',
        value : 'text'
    }, {
        xtype : 'textfield',
        fieldLabel : 'X',
        name : 'objectX',
        width : 380,
        margin : '5 0 0 10'
    }, {
        xtype : 'textfield',
        fieldLabel : 'Y',
        name : 'objectY',
        width : 380,
        margin : '5 0 0 10'
    }, {
        xtype : 'textfield',
        fieldLabel : 'Width',
        name : 'objectWidth',
        width : 380,
        margin : '5 0 0 10'
    }, {
        xtype : 'textfield',
        fieldLabel : 'Height',
        name : 'objectHeight',
        width : 380,
        margin : '5 0 0 10'
    }, {
        xtype : 'textfield',
        fieldLabel : 'Color',
        name : 'objectColor',
        width : 380,
        margin : '5 0 0 10'
    }, {
        xtype : 'htmleditor',
        fieldLabel : 'Custom',
        name : 'objectCustom',
        margin : '5 0 0 10',
        width : 380,
        height : 180
    }];

My Panel's Code is..

var propertyForm = Ext.create('Ext.form.Panel', {
        region : 'center',
        xtype : 'form',
        title : 'Property',
        items : propertyItem
    });

And, After, I Changed That, like this..

propertyItem[0].value = 'This is My Text';

but, In browser, That Can't Change.

At first, That textfield's value is Test,

after, That textfield's value is 'This is My Text',

But, Not change..

What can i do for this Problem?

Sorry to my fool English.. Thanks!

p.s.

If you can't understand this post, please Comment to me...

Upvotes: 2

Views: 930

Answers (1)

MMT
MMT

Reputation: 2216

try this

propertyForm.items.items[0].setValue('This is My Text');

Upvotes: 2

Related Questions