求助extjs4.0 多条件检索 目前在用extjs4做一个会议信息管理系统,以前没接触过ext,有点迷茫。多条件检索功能哪位大侠能分享下代码吗?ext菜鸟求助啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 那不弄个查询表单,然后点击查询按钮的时候将表单中的参数传递给store重新load下数据就好了store.load({ params: {ok:1,name:'abc'} });将表单组合成{ok:1,name:'abc'}这种json数据 var _store = applyUserGrid.getStore();//拿到你要加载的数据 _store.on('beforeload', function (s) {//绑定事件 s.baseParams = {//带上你的条件 start: 0, limit: 30, activeId: _activeId, beginDate: _beginDate, endDate: _endDate, flag: _flag, ticketType: _ticketType }; }); 谢谢楼上两位大侠,我也知道需要弄个form panel ,问题在于怎样把建好的表单放到 我现有的panelExt.define('SoYi.view.TabPanel',{ extend: 'Ext.tab.Panel', alias: 'widget.sytablepanel', initComponent : function(){ var panel = Ext.create("Ext.grid.Panel",{ store:'conferenceinfo_store', selModel: selModel, columns: pageVar.confcolumns, errorSummary:false, title: '会议信息管理', id:'会议信息管理12', columnLines: true, bodyPadding:0, closable: true, bbar: Ext.create('Ext.PagingToolbar', { store:'conferenceinfo_store', pageSize: 20, displayInfo: true, displayMsg: '显示 {0} - {1} 条,共计 {2} 条', emptyMsg: '没有数据' }), dockedItems: [{ xtype: 'toolbar', items: [{ itemId: 'addButton', text: '添加', tooltip:'新增', //显示提示 iconCls:'icon-add', handler: function() { showConfWindow( 'add' ); } }, '-', { itemId: 'modifyButton', text: '修改', iconCls:'modify', disabled: true, handler: function() { var selection = panel.getView().getSelectionModel().getSelection(); if(selection.length>1){ Ext.MessageBox.alert("提示", "只能选择一条信息进行编辑"); }else{ showConfWindow( 'modify', '会议信息管理12' ); } } },'-', { itemId: 'removeButton', text: '删除', iconCls: 'icon-delete', disabled: true, handler: function(){ var selection = panel.getView().getSelectionModel().getSelection(); var idAll = ""; for(var i = 0; i < selection.length; i++){ idAll += selection[i].get('id'); if(i<selection.length-1){ idAll = idAll + ","; } } var panelStore = this.up("panel").getStore(); if (selection) { Ext.MessageBox.confirm("标题", "数据不可恢复,您确定删除此信息吗?", function (btn) { if(btn == 'yes'){ pageVar.deleteurl = pageVar.baspath + '/json/deleteUnit.xhtml'; deleteData(idAll,'会议信息管理12'); } }); } } }, '-' ,{ text:'刷新数据', iconCls:'icon-refresh', handler:function(){ var panelStore = this.up("panel").getStore(); var currPage = panelStore.currentPage; panelStore.removeAll(); panelStore.load(currPage); } },'->','单位名称',new Ext.form.Field(),'省份',new Ext.form.Field(),{ text:'查询', handler: function () { // store.load({ params: { keyword: filed1.getValue()} }); } }] }], listeners: { 'selectionchange': function(view, records) { panel.down('#modifyButton').setDisabled(!records.length); panel.down('#removeButton').setDisabled(!records.length); } } }); Ext.apply(this,{ id: 'content_panel', region: 'center', defaults: { autoScroll:true, bodyPadding: 10 }, activeTab: 0, border: false, //plain: true, items: panel }); this.callParent(arguments); }}) 我写好一个form panel 应该怎样放到上面的代码中? var form=Ext.create("Ext.form.Panel",{/*..配置..*/}); Ext.apply(this,{ id: 'content_panel', region: 'center', defaults: { autoScroll:true, bodyPadding: 10 }, activeTab: 0, border: false, //plain: true, items: [form,panel] });试试。 怎么禁用searchbox的手动编辑 急求jquery 一个问题 怎能讓IE6能正常讀取 png 圖檔 急求正则表达式 请问下如何让页面一打开的时候,file就处于让用户选择的状态 c# \java \javascript如何根据网址 获得 网站的标题 散分100,VML问题。 在线等待,如何在浮动图片上加入动作! 我是新手,寻求帮助??????? 如何判断某个输入框的数据是否数字? jquery datagrid 紧急求助!!ExtJS grid triggerfield的问题
var _store = applyUserGrid.getStore();//拿到你要加载的数据 _store.on('beforeload', function (s) {//绑定事件
s.baseParams = {//带上你的条件
start: 0,
limit: 30,
activeId: _activeId,
beginDate: _beginDate,
endDate: _endDate,
flag: _flag,
ticketType: _ticketType
};
});
Ext.define('SoYi.view.TabPanel',{
extend: 'Ext.tab.Panel',
alias: 'widget.sytablepanel',
initComponent : function(){
var panel = Ext.create("Ext.grid.Panel",{
store:'conferenceinfo_store',
selModel: selModel,
columns: pageVar.confcolumns,
errorSummary:false,
title: '会议信息管理',
id:'会议信息管理12',
columnLines: true,
bodyPadding:0,
closable: true,
bbar: Ext.create('Ext.PagingToolbar', {
store:'conferenceinfo_store',
pageSize: 20,
displayInfo: true,
displayMsg: '显示 {0} - {1} 条,共计 {2} 条',
emptyMsg: '没有数据'
}),
dockedItems: [{
xtype: 'toolbar',
items: [{
itemId: 'addButton',
text: '添加',
tooltip:'新增', //显示提示
iconCls:'icon-add',
handler: function() {
showConfWindow( 'add' );
}
}, '-', {
itemId: 'modifyButton',
text: '修改',
iconCls:'modify',
disabled: true,
handler: function() {
var selection = panel.getView().getSelectionModel().getSelection();
if(selection.length>1){
Ext.MessageBox.alert("提示", "只能选择一条信息进行编辑");
}else{
showConfWindow( 'modify', '会议信息管理12' );
}
}
},'-', {
itemId: 'removeButton',
text: '删除',
iconCls: 'icon-delete',
disabled: true,
handler: function(){
var selection = panel.getView().getSelectionModel().getSelection();
var idAll = "";
for(var i = 0; i < selection.length; i++){
idAll += selection[i].get('id');
if(i<selection.length-1){
idAll = idAll + ",";
}
}
var panelStore = this.up("panel").getStore();
if (selection) {
Ext.MessageBox.confirm("标题", "数据不可恢复,您确定删除此信息吗?", function (btn) {
if(btn == 'yes'){
pageVar.deleteurl = pageVar.baspath + '/json/deleteUnit.xhtml';
deleteData(idAll,'会议信息管理12');
}
});
}
}
}, '-' ,{
text:'刷新数据',
iconCls:'icon-refresh',
handler:function(){
var panelStore = this.up("panel").getStore();
var currPage = panelStore.currentPage;
panelStore.removeAll();
panelStore.load(currPage);
}
},'->','单位名称',new Ext.form.Field(),'省份',new Ext.form.Field(),{
text:'查询',
handler: function () {
// store.load({ params: { keyword: filed1.getValue()} });
}
}]
}],
listeners: {
'selectionchange': function(view, records) {
panel.down('#modifyButton').setDisabled(!records.length);
panel.down('#removeButton').setDisabled(!records.length);
}
}
});
Ext.apply(this,{
id: 'content_panel',
region: 'center',
defaults: {
autoScroll:true,
bodyPadding: 10
},
activeTab: 0,
border: false,
//plain: true,
items: panel
});
this.callParent(arguments);
}
})
Ext.apply(this,{
id: 'content_panel',
region: 'center',
defaults: {
autoScroll:true,
bodyPadding: 10
},
activeTab: 0,
border: false,
//plain: true,
items: [form,panel]
});
试试。