从运行一个ASP.NET 3.5应用程序的IFRAME内GWT应用程序(包括小程序)? [英] Running a GWT application (including Applets) inside an IFRAME from an ASP.NET 3.5 app?

查看:157
本文介绍了从运行一个ASP.NET 3.5应用程序的IFRAME内GWT应用程序(包括小程序)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在寻找整合了全面的GWT(谷歌Web工具包2.0)与现有的ASP.NET 3.5应用程序。我的第一个直觉反应是,这是一个可怕的科学怪人的想法。但是,客户坚持认为,我们使用由第三方开发的这个应用程序。

We are looking at integrating a full-blown GWT (Google Web Toolkit 2.0) application with an existing ASP.NET 3.5 application. My first gut reaction is that this is a horrible frankenstein idea. However, the customer has insisted that we use this application developed by a third-party.

我在GWT应用程序的开发几乎没有控制权。

I have almost NO CONTROL over the development of the GWT app.

我首先想到的是居然试图在iframe嵌入这一点。由于GWT是Tomcat下/雅加达运行,它是从.NET应用程序在不同的服务器上托管的所以IFRAME SRC将是在另一台机器上的URL。

My first thought is to actually attempt to embed this in an iFrame. Because GWT is running under Tomcat/Jakarta, it is hosted on a different server from the .NET app so the iFrame src will be to a URL on the other machine.

我需要利用我们自己的ASP.NET授权方案限制访问嵌入式GWT应用程序。该GWT应用程序也使用嵌入Java小程序,它似乎并没有马上被工作的iframe内。 GWT的应用程序,使得到后端服务器(使用GWT-RPC?)。

I need to utilize our own ASP.NET authorization scheme to restrict access to the embedded GWT application. The GWT app also uses embedded java applets, which don't seem to be working right now inside the iframe. The GWT app makes calls to a backend server (using GWT-RPC?).

什么大的问题,这种方法,任何人都可以看到? GWT会的iframe工作,同时在不同的机器上托管?

Any major problems with this approach that anyone can see? Will GWT work on an iframe while hosted on a different machine?

请注意:只需添加具有相同名称的DIV DOES NOT工作本

NOTE: SIMPLY ADDING A DIV WITH THE SAME NAME DOES NOT WORK FOR THIS!

推荐答案

要阐述什么托尼说,GWT可以住在任何网页上。在最低水平,GWT钩入 DIV 通过ID或元素,作为其<一个href=\"http://google-web-toolkit.google$c$c.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/RootPanel.html\"><$c$c>RootPanel,并添加小部件从那里。

To expound on what Tony said, GWT can live on any page. At its lowest level, GWT hooks into a div by its ID or the body element, as its RootPanel, and adds widgets to it from there.

只是一个DIV添加到您的ASP页面,比如&LT; D​​IV ID =GWT-根/&GT; ,并在你的GWT code,开始与 RootPanel根= RootPanel.get(GWT-根)。然后你就可以开始添加小部件到面板打造你的页面的GWT部分。

Simply add a div to your ASP page like <div id="gwt-root" /> and in your GWT code, start with RootPanel root = RootPanel.get("gwt-root"). Then you can start adding widgets to that panel to build the GWT portion of your page.

您还需要在你的GWT产生code以脚本带来标签,就像这样:

You'll also need to bring in your GWT generated code with a script tag, like so:

<script type="text/javascript" src="gwt-app-name/gwt-app-name.nocache.js">

另外,如果你愿意,可以GWT使用常规的JavaScript使用<页面的其余部分进行交互href=\"http://googlewebtoolkit.blogspot.com/2008/07/getting-to-really-know-gwt-part-1-jsni.html\">JSNI.

这篇关于从运行一个ASP.NET 3.5应用程序的IFRAME内GWT应用程序(包括小程序)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆