----app--------
Ext.Loader.setConfig({
enabled:true
});Ext.application({
name: 'esbApp',
appFolder: 'scripts',
autoCreateViewport: true,
models: ['SysUserInfo'],
stores: ['FrameMenus','SysUserStore'],
controllers: ['FrameMenu','SysUserCtrl'],
launch: function() {
setTimeout(function() {
Ext.get('loading').remove();
Ext.get('loading-mask').fadeOut({
remove : true
});
}, 1000);
}
});----controller--------
Ext.define('esbApp.controller.SysUserCtrl',{
extend: 'Ext.app.Controller',
views: ['SysUserEdit'],
//refs:[{ref:'SysUserEdit', selector: 'sysuseredit'}],
init: function() {
console.log('init...');
this.control({
'sysuseredit button[action=save]': {
click: this.saveSysUser
}
});
},
saveSysUser: function(button) {
console.log('clicked the Save button');
}
});
Ext.Loader.setConfig({
enabled:true
});Ext.application({
name: 'esbApp',
appFolder: 'scripts',
autoCreateViewport: true,
models: ['SysUserInfo'],
stores: ['FrameMenus','SysUserStore'],
controllers: ['FrameMenu','SysUserCtrl'],
launch: function() {
setTimeout(function() {
Ext.get('loading').remove();
Ext.get('loading-mask').fadeOut({
remove : true
});
}, 1000);
}
});----controller--------
Ext.define('esbApp.controller.SysUserCtrl',{
extend: 'Ext.app.Controller',
views: ['SysUserEdit'],
//refs:[{ref:'SysUserEdit', selector: 'sysuseredit'}],
init: function() {
console.log('init...');
this.control({
'sysuseredit button[action=save]': {
click: this.saveSysUser
}
});
},
saveSysUser: function(button) {
console.log('clicked the Save button');
}
});
解决方案 »
- swfUpload的问题
- |zyciis| 如何动态的加载一个js文件,而且让网页上可以掉用。谢谢
- 有高手能帮我解决这问题么?
- 请问如何重载DOM的内置函数 譬如window.onbeforeunload
- ff中怎么判断iframe是否导入成功?
- div的问题,求大家帮帮忙!
- 请问:在javascript的脚本函数里能嵌vbs的代码,vbs也能给javascript变量赋值,javascript能给vbs的变量赋值么?
- 如何用JAVASCIRPT得到上个网页的网址(100分)
- 有关iframe的问题!急
- 如何给一个tr定义属性
- asp中,你有没有办法让a.asp执行b.asp中的js函数?
- javascript 实现fibonacci
Ext.define('esbApp.view.SysUserEdit',{
extend: 'Ext.form.Panel',
alias: 'widget.sysuseredit',
initComponent: function() {
this.title = '用户新增',
this.height = 300,
this.width =400,
this.url = '',
this.bodyPadding = 5,
this.layout = {
type: 'vbox',
baseCls : "x-plain",
align: 'center'
},
this.defaultType ='textfield',
this.blankText ='该项不能为空!',
this.items = [{
fieldLabel: '名称',
name: 'sysUserName',
allowBlank: false
},{
fieldLabel: '用户名',
name: 'userName',
allowBlank: false
},{
fieldLabel: '密码',
name: 'password',
allowBlank: false
},{
xtype: 'button',
text: '提交',
width: 80,
action: 'save',
formBind: true,
action: 'save',
url: 'demo/saveSysUser.action',
handler: function(){
var form = this.up('form').getForm();
if (form.isValid()) {
form.submit({
success: function(form, action) {
Ext.Msg.alert('Success');
},
failure: function(form, action) {
Ext.Msg.alert('Failed');
}
});
}
}
}];
this.callParent();
}
});
-----tabpanell----if (record.get('leaf')) {
var panel = Ext.getCmp(record.id);
if(!panel){
panel = {
title: record.get('text'),
iconCls: 'treeNodeLeafIcon',
html: '<iframe id="iframe_'+record.id+'" src="'
+ '/'
+ getAppName()
+ record.data.url
+' " width=100% height=100% marginwidth="0" framespacing="0" marginheight="0" frameborder="0" ></iframe>',
closable: true
};
//test();
openTab(panel,record.id);
.....
this.control({
'sysuseredit > button': {
click: this.saveSysUser
}