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条)

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?