gwt 部署在div 中的问题。

2019-03-25 13:47|来源: 网路

按照这片文章(http://developerlife.com/tutorials/?p=231)将我的gwt部署在div 中,文章提到:
the page might resize, depending on the styling that you apply to your widgets.
我不想让gwt改变我的页面大小,有什么办法吗?
问题补充:
我加了宽度限制但是没有影响啊。
<div id="computer" class="width: 800px;">
</div>
问题补充:
我以前也有限制宽度:width: 60em; 但是gwt就会改变宽度。
div#container {
    /*width: 60em;*/
    width: 80%; /*Width of main container*/
}
现在我用width: 80% 或者 width: 800px 都没有问题了。

谢谢stone的帮助。

相关问答

更多
  • 鉴于您当前的SafeHtmlRenderer ,它解决了TextInputCell默认行为的先前错误 ,您只需切换到默认构造函数: new TextInputCell() 。 Given your current SafeHtmlRenderer, which works around a previous bug of TextInputCell's default behavior, you can just switch to the default constructor: new TextInpu ...
  • 是的,您需要在GWT项目的web.xml中设置您的Restlet Servlet。 然后,以调试模式启动gwt项目(将启动jetty servlet),您将访问http://127.0.0.1:8888/YourServlet/ ...您最终可以在另一台服务器中部署Restlet Servlet。 最后使用RequestBuilder编写客户端服务。 请记住,如果您将Restlet服务部署在另一个主机上,而不是您为其服务的主机(例如,您的重定时器在http:// another_host:another_p ...
  • 这取决于您是否将您的网站显示为基于浏览器的应用程序或一系列页面。 在应用程序样式中,用户很少从应用程序的URL导航,因此GWT模块是长期存在的,服务器是相对无状态的。 在页面序列样式中,每次用户浏览到新URL时都会重新启动GWT模块,因此服务器必须维护状态以在每次页面加载时发送回客户端。 为应用程序样式编写状态管理使用与任何类型的桌面或服务器应用程序相同的模式。 您通常有一些服务对象代表与服务器(GWT-RPC或RequestFactory)进行数据交换,并且代理可用于模块中需要状态的各种对象。 对象将它们 ...
  • 我相信这与此问题和此问题类似。 如果是这样,只需删除项目的gwt-unitCache文件夹中的所有文件,你应该没问题。 Finally, this issue is fixed. It's caused by the build order. In addition to GWT, I am using GXT, which seems like "shadowing" com.google.gwt.uibinder.rebind.UiBinderWriter class. The solution is ...
  • 我发现了问题。 我更新了代码示例,因为我在函数之前声明了两个包含的javascripts。 当我拖着脚走动它起作用: