首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

ExtJs的扩充例子

2012-08-28 
ExtJs的扩展例子Ext.ux.combo.MyComboBox Ext.extend(Ext.form.ComboBox, {xtype: combo,fieldLabel:

ExtJs的扩展例子

Ext.ux.combo.MyComboBox = Ext.extend(Ext.form.ComboBox, {    xtype: 'combo',    fieldLabel: 'myCombo',    anchor: '90%',    valueField:"id",    displayField:'text',        typeAhead: true, //自动补全    minChars : 1, //输入一个字符就激活    queryParam: 'name', //查询字符    width:150,    editable: true,    mode: 'remote',    forceSelection: true, //限定选中的值为列表中的值    triggerAction: 'all', //每次下拉均显示查询选项    emptyText:'请选择',    blankText:'请选择',        selectOnFocus:true, //用户只能选择值        minListWidth: 240, //分页宽度    pageSize:10,//每页条数    store: new Ext.data.JsonStore({    url: 'testAction!getXXX.action',    autoLoad:true,    root: 'root',totalPropety: 'total',    idProperty: 'id',    baseParams : {            name: ''        },    fields: ['text', 'value']}),    initComponent: function() {        Ext.ux.combo.MyComboBox.superclass.initComponent.call(this);    }});Ext.reg('myCombo', Ext.ux.combo.MyComboBox);

热点排行
Bad Request.