如题,不是因为编码格式乱码,而是Ext.isArray(objs)) { args = arguments.length > 1 ? arguments : objs; for (len = args.length; i < len; i++) { me.add(args[i]); } } else { for (key in objs) { if (objs.hasOwnProperty(key)) { if (me.allowFunctions || typeof objs[key] != 'function') { me.add(key, objs[key]); } } } } };each:function (fn, scope){ var items = [].concat(this.items), i = 0, len = items.length, item; for (; i < len; i++) { item = items[i]; if (fn.call(scope || item, item, i, len) === false) { break; } } };eachKey:function (fn, scope){ var keys = this.keys, items = this.items, i = 0, len = keys.length; for (; i < len; i++) { fn.call(scope || window, keys[i], items[i], i, len); } };findBy:function (fn, scope) { var keys = this.keys, items = this.items, i = 0, len = items.length; for (; i < len; i++) { if (fn.call(scope || window, items[i], keys[i])) { return items[i]; } } return null; };find:function () { if (Ext.isDefined(Ext.global.console)) { Ext.global.console.warn('Ext.util.MixedCollection: find has been deprecated. Use findBy instead.'); } return this.findBy.apply(this, arguments); };insert:function (index, key, obj){ var 这种乱码,,有见过的没 ,急急急急
解决方案 »
- 在ext的formPanel中如何实现文件下载
- 怎么统计这个论坛在线人数?
- 我想屏蔽鼠标事件应该怎么做
- 通过子页面向父页面传参数实行倒计时,可是参数只能用一次,第二次又没有了?
- JS正则如何提取多个关键字?
- 高手帮助,双引号问题,请求支援!!!!
- 类似这样的:confirm("是否真的要删除当前记录?")
- List列表框的默认是有排序功能的,现在需求不让排序,保持原样,如何做到? 请教
- Iframe的src="http://www.web.com",这个时候取www.web.com里面控件值???
- 我自己做了一个控件,请问如何加栽倒网页中,最重要的是我如何调用孔径的接口函数,我对js一无所知希望个位大时能给出详细的代码
- JS缓慢执行?
- 求输入金额格式的JS代码,谢谢!
var form_updateInterface_grid = Ext.create('Ext.grid.Panel', { id : 'form_updateInterface_grid',
name : 'services',
title : '服务[至少填写一个]',
store : form_interface_serviceStore,
tbar : {
items : [ {
text : '新增',
id : 'form_createInterface_tbar_btnAdd',
scale : 'small',
width : 50,
handler : function() {
var r = Ext.ModelManager.create( {
text : '新建服务1',
description : '这里必须要填写至少一个服务'
}, 'Service');
form_interface_serviceStore.insert(0, r);
from_interface_serviceStore_cellEdit.startEditByPosition( {
row : 0,
column : 0
});
}
}, {
text : '删除',
id : 'form_createInterface_tbar_btnDel',
scale : 'small',
width : 50,
handler : function() {
alert('del');
}
} ]
},
columns : [ {
header : '服务名称',
dataIndex : 'text',
flex : 22,
field : 'textfield'
}, {
header : '服务描述',
dataIndex : 'description',
flex : 78,
field : 'textfield'
} ],
plugins : [ Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit : 1,
listeners : {
beforeedit : function(record) {
form_updateInterface_deleteServiceRecordIndex = record.rowIdx;
}
}
}) ],
height : 255});
/**
* Window中FormPanel
*/
var form_createInterface = Ext.create('Ext.form.Panel', {
id : 'form_createInterface',
width : '100%',
height : '100%',
bodyPadding : 5,
border : 0,
url : 'interfaceInfoSaveController.do',
method : 'post',
layout : 'anchor',
defaults : {
anchor : '100%'
},
defaultType : 'textfield',
items : [ {
fieldLabel : '接口名称',
name : 'text',
allowBlank : false
}, {
name : 'id',
hidden : true
}, {
xtype : 'combobox',
fieldLabel : '启动方式',
//id : 'form_autoRun_combobox',
name : 'autoRun',
store : Ext.create('Ext.data.Store', {
fields : [ 'value', 'displayField' ],
data : [ {
"value" : "true",
"displayField" : "自动启动"
}, {
"value" : "false",
"displayField" : "手动启动"
} ] }),
displayField : 'displayField',
valueField : 'value',
typeAhead : true,
queryMode : 'local',
allowBlank : false,
value : 'false'
}, {
xtype : 'textarea',
fieldLabel : '描述信息',
name : 'description',
allowBlank : false
}, form_createInterface_grid ]
});这是Extjs 代码
var form_interface_serviceStore = Ext.create('Ext.data.Store', {
model : 'Service',
fields : [ 'id', 'parentId', 'text', 'description' ],
data : [ {
text : '新建服务1',
description : '这里必须要填写至少一个服务'
} ],
autoLoad : false
});这是Store的代码