我们单位已经有一个开发完成的web项目,是使用eclipse的wtp开发的动态web项目
现在需要增加一些功能,我希望能使用gwt开发。请问如何在项目中加入gwt?
确实是那样的。
[code="html"]
</head>
<body>
<script language='javascript'
src='com.yourcompany.product..Main.nocache.js'>
</script>
<iframe src="javascript:''"
id="__gwt_historyFrame"
style="width:0;height:0;border:0">
</iframe>
<!-- The div and p are here purely for demonstrating where the kiosk
screen will be. It should be removed before release! -->
<!--
<p class="removeme">
The yellow dashed line is purely to demonstrate what the kiosk
screen will show, it should be removed (along with the div that
is creating it) before release!
</p>
-->
<!-- Add a blank line for better outlook temporary, remove it before release! -->
<div class="removeme">
<div id="main" /> / <!-- 这相当于gwt的容器! -->
</div>
<div id="others" /> <!-- 这以后自行处理,已经不被gwt包含-->
</body>
[/code]
在你的EntryPoint class 中用这句:
RootPanel.get("main").add(/*你自己的组件 */);