ExtJs Ext.tree.AsyncTreeNode 在loader的时候如何传参,使树刷新???
时间:2011-04-26 来源:jsnt_rd
//定义一个树
var root=new Ext.tree.AsyncTreeNode({
id:"-1",
loader:new Ext.tree.TreeLoader({
url:"GetData.aspx?temp="+temp,
//此处temp的值想通过下面FormPanel的选择框传递过来
listeners:{
"beforeload":function(treeloader,node)
{
treeloader.baseParams={
id:node.id,
method:'POST'
};
}
}
})
});
//定义一个FormPanel
var AddInfofp = new Ext.FormPanel(
{
region:'center',
resizable:false,
labelWidth:90,
collapsible:true,
closeAction:'hide',
closable:true,
plain : true,
frame:true,
border:false,
layout: 'form',
bodyStyle:"padding:5px 5px 5px 5px",
items:[{
name:"dp_id",
xtype:"combo",
store:DataPrivstore,
mode:"remote",
displayField:"dp_name",
valueField:"dp_id",
forceSelection:true,
fieldLabel:"数据权限级",
editable:false,
typeAhead:true,
selectOnFocus:false,
triggerAction:"all",
allowBlank:false,
anchor:"90%",
listeners:{scope:this,
render : function(combo) {combo.setValue("门店");},
select:function()
{
field=AddInfofp.form.findField("dp_id");
if(field.isValid())
{
var valued=field.getValue();
此处想根据COMBO下拉选择值来传递给上面的树,使树的数据重新加载
}
}
}
}]
});
//后台GetData.aspx.cs
string temp = Request.Form["temp"];
此处获取前台temp值