PDA

View Full Version : ext js 4 window don't want change options at first time



Unkind
22 Oct 2012, 1:45 AM
I have window


Ext.define('SD.view.SDDetail', {
extend: 'Ext.window.Window',
alias: 'widget.sddetailwindow',
height: 620,
width: 850,
layout: 'fit',
border: false,
modal: true,

isDemandReadOnly: true,
changeStatusOnly: true,
isNew: true,
initComponent: function () {}}
when i open it i want change options isDemandReadOnly isNew changeStatusOnly like this, this code from controller


, onAdd: function (item) {
var win = this.getSdDetailWindow({
isDemandReadOnly: false,
changeStatusOnly: false,
isNew: false
});

win.show();
}
but at first time isDemandReadOnly isNew changeStatusOnly dont change it values at second it is all ok why at first time my values not change?

scottmartin
22 Oct 2012, 7:57 AM
You need to create the properties in a config:{} so you can change the values using automatically created setter/getter for each.

Please review the following:
http://www.sencha.com/learn/sencha-class-system

Scott.