ExtJS
共 8 篇文章
Ext中FormPanel控件自动填充表单
向FormPanel中的自动填充表单赋值共有三种方法: 1、利用URL的方案: form1.form.load( { url : EDIT_ACTION_URL+'?sid='+ _record.get('id'), waitMsg : '正在载入数据...', success : function(form,action) { Ext.example.msg('编辑', '载入成功!'); }, failure : function(form,action) { Ext.example.msg('编辑', '载入失败'); } }); 2、利用store中的Record进行填充: var …
dwr出现error marshalling data,see the logs for more details问题
js页面: var obj = {}; obj.id='11111'; obj.address='sdfaf'; obj.area = 100.0; obj.unitprice = 10000.0; obj.ispassed = true; transBuildingXController.saveTransBuildingX(obj,function(data){ alert(data); }) 后台java的transBuildingXController方法: public TransBuildingX saveTransBuildingX(TransBuildingX transBu…
Ext.form.ComboBox简单用法
//二维数组,保存年份的值和文本,文本作显示用 var year = [['2005', '2005'], ['2006', '2006'], ['2007', '2007'], ['2008', '2008'], ['2009', '2009'], ['2010', '2010'], ['2011', '2011'], ['2012', '2012']]; //SimpleStore=Store+MemoryProxy+ArrayReader var storeyear = new Ext.data.SimpleStore({ //在此创建了两列数据.第一列列名为value,用于存储值 /…
2014-09-03 13:33 · ExtJS
一维数组对Combobox赋值
1、前台直接赋值 { id:'city', xtype:'combo', fieldLabel:'地级市', name:'city', readOnly:false, anchor:'98%', msgTarget: 'side', mode:'local', triggerAction:'all', store:[‘运城市’,'晋中市'], allowBlank:false, blankText:'地级市不能为空' } 2、后台传递数据进行赋值(List<String>,一维数组) { id:'city', xtype:'combo', fieldLabel:'地级市', name:'ci…
2014-09-03 12:56 · ExtJS
store转化为json形式填充html的table空间
store转化为json形式: function storeToJson(store){ var arr; if(store instanceof Ext.data.Store){ arr= new Array(); store.each(function(record){ // alert(record); arr.push(record.data); }); }else if(store instanceof Array){ arr = new Array(); Ext.each(store,function(record){ arr.push(record.data); }); } r…
2014-06-12 00:36 · json · ExtJS · javascript
ext中年月日使用combobox控件
年月日的表达使用combobox控件: var zoneStore = new Ext.data.ArrayStore({ fields : ['cityzone'], data : [], sortInfo : { field : 'cityzone', direction : 'ASC' } }); var monthStore = new Ext.data.ArrayStore({ fields : [ 'month' ], data : [ [ '1' ], [ '2' ],[ '3' ], [ '4' ],[ '5' ], [ '6' ],[ '7' ], [ '8' ],[ '9…
2014-06-02 11:56 · ExtJS
combobox
1、使用combobox时,它有一个hiddenName的属性,专门用于提交combobox中value的值. 现假设某combobox的Id为comboId,hiddenName属性的值为hiddenValue, 那么,使用Ext.get('comboId').dom.value方法获取的是combobox中选中项的文本text值, 而使用Ext.get('hiddenValue').dom.value获取的才是combobox中需要提交的value的值。 2、 出现这种情况,赋值给id时在combo中也显示的是id的值,不能将name值显示出来。 使用combobox时它的store从后…
2013-11-13 19:47 · ExtJS
ext中store的各个应用
关于store方面的各种应用 一、使用dwr方式的应用: 1、 var notarialtyperecord = new Ext.data.Record.create([ {name:'id'}, {name:'name'} ]) var notarialtypestore = new Ext.data.JsonStore({ fields:notarialtyperecord }) //dwr调用方法给store赋值 notarialTypeService.findAll(function(data1){ if(data1!=null) { notarialtypestore.loadDa…
2013-09-16 18:16 · ExtJS