Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何交换Extjs面板内容?_Extjs - Fatal编程技术网

如何交换Extjs面板内容?

如何交换Extjs面板内容?,extjs,Extjs,在我的应用程序中有两个面板-A和B 我使用“边界”布局,面板A位于中心区域,面板B位于南部区域,高度为200 “面板A”有很多项,如网格、工具栏等。面板B也有一些项 我的问题是,如何将A的内容交换到B和B的内容交换到A 注意:我使用的是“ExtJS3.2” 问候, 穆罕默德·沙菲克(Mohammed Shafeek)边境布局的中部和南部地区的面板必须由集装箱组件包裹。然后,您可以轻松地获取每个容器的内容,清除容器并从第二个容器向其中添加内容 因此,开关面板的功能应如下所示: function s

在我的应用程序中有两个面板-A和B

我使用“边界”布局,面板A位于中心区域,面板B位于南部区域,高度为200

“面板A”有很多项,如网格、工具栏等。面板B也有一些项

我的问题是,如何将A的内容交换到B和B的内容交换到A

注意:我使用的是“ExtJS3.2”

问候,


穆罕默德·沙菲克(Mohammed Shafeek)

边境布局的
中部和
南部地区的面板必须由集装箱组件包裹。然后,您可以轻松地获取每个容器的内容,清除容器并从第二个容器向其中添加内容

因此,开关面板的功能应如下所示:

function switchPanels() {
    southContainer = Ext.getCmp('southContainer');
    centerContainer = Ext.getCmp('centerContainer');

    southContainerItems = southContainer.items.getRange();
    centerContainerItems = centerContainer.items.getRange();

    southContainer.removeAll(false);
    centerContainer.removeAll(false);

    for (var i = 0; i < southContainerItems.length; i++) {
        centerContainer.add(southContainerItems[i]);
    };

    for (var i = 0; i < centerContainerItems.length; i++) {
        southContainer.add(centerContainerItems[i]);
    };  

    centerContainer.doLayout();
    southContainer.doLayout();
}
功能开关面板(){
southContainer=Ext.getCmp('southContainer');
centerContainer=Ext.getCmp('centerContainer');
southContainerItems=southContainer.items.getRange();
centerContainerItems=centerContainer.items.getRange();
southContainer.removeAll(false);
centerContainer.removeAll(false);
对于(变量i=0;i

要获得完整的现场示例,请看这把小提琴:

太棒了,谢谢很多朋友,它对我真的很有帮助。。。现在我的应用程序正在显示magics.:)