您的位置:首页 > Web前端

Ext.js问题重现整理(3)(reference)(实例化后才能引用)

2015-12-31 18:44 609 查看
Ext.define('MTTECERP.view.stomer.addwoCtrl', {

extend: 'Ext.app.ViewController',

alias: 'controller.woCtrl',

showWindow: function (obj) {

var win = this.lookupReference('popupWindow');

if (!win) {

//实例化后才能引用
//win = new MTTECERP.view.stomer.woWindow();
win = Ext.create('MTTECERP.view.stomer.woWindow')

this.getView().add(win);

}

win.show();
},
});


//实例化store
var TreeStore = Ext.create('MTTECERP.view.stomer.wotreestore')
Ext.define('MTTECERP.view.stomer.woWindow', {
extend: 'Ext.window.Window',
xtype: 'form-contact-window',
title: '处理状态',
reference: 'popupWindow',

width: 400,
height: 500,
minWidth: 300,
minHeight: 380,
layout: 'fit',
resizable: true,
modal: true,
defaultFocus: 'firstName',
closeAction: 'hide',
defaults: {
xtype: 'treepanel',
width: 300,
height: 200,
rootVisible: false,
// Sharing the store synchronizes the views:
store: TreeStore
},
等等等等
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: