简单的获取焦点
focus:function(th){
th.focus(true);}
鼠标移上去 显示所有
renderer:function(v){
if(v != null && v!="")
return "<span title='"+v+"'>"+v+"%"+"</span>";
}
清除上次修改记录
pruneModifiedRecords : true,
组合下拉框
store : new Ext.data.SimpleStore( {
fields : [ 'value', 'text' ],
data : [ [ '0', '待安排' ], [ '1', '已安排' ]]
}),
------简单的下拉框
id: 'classify',
header: '分类',
dataIndex: 'classify',
width: 200,
renderer:function(v){
return getDecode(v,null,"",["0","其它","1","研发","2","采购","3","市场支持"]);
},
editor:new fm.ComboBox({
store : new Ext.data.ArrayStore({
data:[["0","其它"],["1","研发"],["2","采购"],["3","市场支持"]],
fields:["value","text"]
}),
mode : "local",
triggerAction : "all",
displayField : "text",//选择的时候显示的值
valueField : "value"//最终显示的数据 然后经过renderer渲染
})
------------
listeners:{
select:function(cmb,record,index){
Ext.getCmp("todaywork").getStore().getAt(selectRowIndex).set("account",record.data["value"]);
Ext.getCmp("todaywork").getStore().getAt(selectRowIndex).set("principal",record.data["username"]);
if(Ext.getCmp("todaywork").getStore().getAt(selectRowIndex).get("deptname")==null ||
Ext.getCmp("todaywork").getStore().getAt(selectRowIndex).get("deptname") == ""){
Ext.getCmp("todaywork").getStore().getAt(selectRowIndex).set("deptname",record.data["deptname"]);
Ext.getCmp("todaywork").getStore().getAt(selectRowIndex).set("depten",record.data["depten"]);
}
},
focus:function(th){
th.focus(true);
}
}
-----------------------
Map<String, Object> map = new HashMap<String, Object>();
Object[] obj = (Object[]) list.get(i);
map.put("id", obj[0]==null ? "" : obj[0].toString());
--------------
<comment>标准批量任务表</comment>
<id name="funcid" type="java.lang.Long">
<column name="FUNCID" precision="10" scale="0" />
<generator class="sequence">
<param name="sequence">PMS_PRJ_SCOPE_SEQ</param>
</generator>
</id>
-------------------
一个数据 传递两次 就会自动转成数组
本文介绍如何使用 ExtJS 实现组件的功能定制与数据绑定,包括获取焦点、下拉框配置、数据渲染及监听事件等操作。通过具体示例展示了如何设置下拉框的数据源、渲染方式以及响应事件。

2373

被折叠的 条评论
为什么被折叠?



