shang_zchao 2009-09-01 08:55
浏览 209
已采纳

EXT 窗体中值的获取和回传

这个是一个Window 我点击左侧的树链接 右侧展示其详细信息 ,我想在选中右侧的一行数据后 获取到点击“确认”后将选中的数据回传给父页面。
遇到的问题:1.由于右侧内容是动态获取数据的单独页面,怎么样在Window 中获取到选中的数据;2.怎么样将选中的数据回传给父页面。

[code="ruby"]
button.on('click', function(){
var root = new Ext.tree.AsyncTreeNode({id:'0', draggable:false,text:'管理员',expanded: true});
var tree = new Ext.tree.TreePanel({
animate:true,
autoScroll:true,
containerScroll: true,
useArrows:true,
enableDD:true,
loader:new Ext.tree.TreeLoader({dataUrl:'/UOP/jsp/actor/extjsTree.jsp',requestMethod: 'GET'}),
collapseFirst:false,

border: false,
height: 300,
width: 200
});
tree.setRootNode(root);
tree.on('click',function clickTree(node){

try{

if(!node.isLeaf()){

return false;

}
Ext.get("main-panel").load({
url:node.attributes.url,
scripts: true,
params: "param1=main-panel",
text: "加载数据..."
});
}catch (ex) {

}

});
//主数据展示区域
var tabs = new Ext.Panel({
region: 'center',
id: 'main-panel',
title: '信息区',
margins:'3 3 3 0',
activeTab: 0,
autoScroll :true,
html:'点击树,选择符合条件信息'
//items:[{title:'详细信息',name:'tre',value: "summary4",id:'a'}]
});
// 左侧功能树区域
var nav = new Ext.Panel({
//title: '树木',
region: 'west',
collapseMode:'mini',
split: true,
width: 150,
collapsible: true,
items:[tree]
});

//South
var win = new Ext.Window({
        title: '选择窗口',
        closable:true,
        width:500,
        height:350,
        //border:false,
        plain:true,
        layout: 'border',
        autoScroll :true,
        items: [nav, tabs],
        buttons: [{
        text: '确认',
           listeners:{'click':function()
                         {

                         }
                      }
        },{
            text: '取消',
             listeners:{'click':function()
                         {
                            win.close(this);
                         }
                       }
        }]
    });

    win.show(this);
});

[/code]

  • 写回答

2条回答

  • iteye_10013 2009-09-01 09:11
    关注

    Ext.getCmp('gridid')
    或Ext.log('xx')看下Component Insperctor里面又没有你载入的组件(3.0)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料