Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.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
在GWT的新窗口中显示小部件_Gwt_Uibinder - Fatal编程技术网

在GWT的新窗口中显示小部件

在GWT的新窗口中显示小部件,gwt,uibinder,Gwt,Uibinder,我需要在新窗口中显示拖放单元格表。 我已经检查了答案,并在谷歌上搜索了一下,但没有找到合适的答案。 我可以打开一个新的窗口点击一个按钮。以下是我正在使用的代码: @UiHandler(value = { "buttonReleaseView" }) void onReleaseViewClick(ClickEvent clickEvent) { String winUrl = GWT.getModuleBaseURL() + "releaseView/";

我需要在新窗口中显示拖放单元格表。 我已经检查了答案,并在谷歌上搜索了一下,但没有找到合适的答案。 我可以打开一个新的窗口点击一个按钮。以下是我正在使用的代码:

@UiHandler(value = { "buttonReleaseView" })
    void onReleaseViewClick(ClickEvent clickEvent) {
        String winUrl = GWT.getModuleBaseURL() + "releaseView/";
        String winName = "Release View";

        openNewWindow (winName, winUrl);  /* spawn a new window - not popup */
    }

    /**
    * Opens a new windows with a specified URL..
    * 
    * @param name String with the name of the window.
    * @param url String with your URL.
    */
    public static void openNewWindow(String name, String url) {
        com.google.gwt.user.client.Window.open(url, name.replace(" ", "_"),
               "menubar=no," + 
               "location=false," + 
               "resizable=yes," + 
               "scrollbars=yes," + 
               "status=no," + 
               "dependent=true");
    }
现在,我应该如何在这个新窗口中显示单元格表

请帮帮我

提前谢谢


Richa

GWT模块位于浏览器页面内,因此如果您想打开新的浏览器页面并在其中显示GWT组件,基本上需要在其自己的主机页面中加载新的GWT模块。在这种情况下,我可能会使用弹出窗口,因为这样会更简单

但如果确实需要这样做,可以创建单独的主机页和GWT模块来显示表,也可以重用相同的主机页和GWT模块,并传递一些URL参数或历史标记来指示要显示的视图。请记住,即使在最后一种情况下,浏览器中仍会运行两个GWT模块实例


通过调用window.open()返回的句柄上的
document.write
,也可以或多或少地直接写入新的浏览器窗口,但我只会在不需要太多用户交互的简单事情上这样做(例如,我使用这种方法来实现打印预览功能).

GWT模块位于浏览器页面内,因此如果您想打开新的浏览器页面并在其中显示GWT组件,基本上需要在其自己的主机页面中加载新的GWT模块。在这种情况下,我可能会使用弹出窗口,因为这样会更简单

但如果确实需要这样做,可以创建单独的主机页和GWT模块来显示表,也可以重用相同的主机页和GWT模块,并传递一些URL参数或历史标记来指示要显示的视图。请记住,即使在最后一种情况下,浏览器中仍会运行两个GWT模块实例


通过调用window.open()返回的句柄上的
document.write
,也或多或少有一些直接写入新浏览器窗口的黑客方法,但我只会在不需要太多用户交互的简单事情上这样做(例如,我使用这种方法来实现打印预览功能)。

非常感谢David。我会尝试你的解决方案,并让你知道。非常感谢你,大卫。我会尝试你的解决方案,并让你知道。