我正在使用 ExtJS 3.3,我的代码如下formpanel
:
Ext.apply(this, {
items: [{
xtype: 'textfield',
fieldLabel: 'ApplicationGUID',
labelAlign: 'right',
name: 'Application_GUID',
value: 0,
readOnly: false,
width: 300
},
{
xtype: 'textfield',
fieldLabel: 'ApplicationName',
labelAlign: 'right',
name: 'Application_Name',
anchor: '-20',
msgTarget: 'side'
}
], //eof items
tbar: [{
xtype: 'mydeletebutton',
scope: this,
ownerCt: this,
handler: this.deleteHandler,
myAuth: {
compBaseRights: {
Delete: {
failProperty: {
disabled: false
}
} /*eof Delete*/
} /*eof compBaseRights*/
} /*eof sgAuth*/
}, {
xtype: 'tbseparator'
}, {
xtype: 'trashcanbutton',
scope: this,
ownerCt: this,
handler: this.setIsDeletedHandler,
myAuth: {
compBaseRights: {
Insert: {
failProperty: {
disabled: false
}
} /*eof Delete*/
} /*eof compBaseRights*/
}
}, {
xtype: 'mytrashcanrestorebutton',
scope: this,
ownerCt: this,
handler: this.unsetIsDeletedHandler,
myAuth: {
compBaseRights: {
Insert: {
failProperty: {
disabled: false
}
} /*eof Delete*/
} /*eof compBaseRights*/
}
}, {
xtype: 'tbseparator'
}, {
xtype: 'mysavebutton',
scope: this,
handler: this.saveHandler,
myAuth: {
compBaseRights: {
Write: {
failProperty: {
disabled: false
}
} /*eof Delete*/
} /*eof compBaseRights*/
}
}],
bbar: {
xtype: 'mystatusbar'
}
});
我正在寻找的是对于textfield
Application_GUID,readOnly: true
如果值已经存在(例如当我从网格中双击现有的值以对其进行编辑时),并且如果我从我的grid
,我需要readonly
声明false
。
如果有人可以帮助我,那就太感谢了。谢谢。