如何将网页嵌入 GWT/GXT Web 应用程序?

发布于 2024-08-20 04:07:12 字数 190 浏览 4 评论 0原文

我正在努力(概念上)重新创建我在 GWT/GXT 中用 Cappuccino 编写的原型。 Cappuccino 使得使用 WebView 将外部网页显示为应用程序的一部分变得非常简单。

但是,我找不到任何方法可以使用 GWT/GXT 来做到这一点。有一个 HtmlContainer 小部件,但这似乎是用于其他用途。关于如何执行此操作有什么建议吗?

I am working to recreate (conceptually) a prototype I've written in Cappuccino in GWT/GXT. Cappuccino made it trivial to display an external webpage as part of the application by using a WebView.

However, I cannot find any way to do this with GWT/GXT. There is a HtmlContainer widget, but this seems to be intended for something else. Any suggestions on how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千鲤 2024-08-27 04:07:12

如果您有 html 代码并且只想渲染它,请使用“HTML”小部件。形成文档

可以包含任意 HTML 的小部件。该小部件使用一个元素,使其以块布局显示。

如果您想在您的网络应用程序中显示不同的页面,例如 stackoverflow.com,请使用“frame”小部件。来自文档

包装 IFRAME 元素的小部件,可以包含任意网站。

If you have the html-code and just want to render it use the "HTML"-widget. Form the docs

A widget that can contain arbitrary HTML. This widget uses a element, causing it to be displayed with block layout.

If you want to display a different page e.g. stackoverflow.com in your webapp use the "frame" widget. From the docs:

A widget that wraps an IFRAME element, which can contain an arbitrary web site.

燕归巢 2024-08-27 04:07:12

您可以设置 ContentPanel

例如,

ContentPanel panel = new ContentPanel();
panel.setUrl("http://www.url.com/page");
panel.setHeaderVisible(false);
panel.setBorders(false);
panel.setBodyBorder(false);

您也可以对 GXT Window 类执行此操作。

You can set the url of a ContentPanel

e.g.

ContentPanel panel = new ContentPanel();
panel.setUrl("http://www.url.com/page");
panel.setHeaderVisible(false);
panel.setBorders(false);
panel.setBodyBorder(false);

You can also do this for the GXT Window class too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文