GWT LayoutPanel不会在Firefox中扩展其子项

时间:2013-12-30 12:54:42

标签: firefox gwt layout cross-browser

GWT 2.5.1,Firefox 26.0。没有风格,没有继承。

我正在尝试将一个Widget添加到LayoutPanel的堆栈中,并希望它默认填充整个页面。但在Firefox它不起作用。 TextArea根本没有拉伸Button - 只有高度,但不是宽度。

layout

package foo.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.*;

public class HW implements EntryPoint {

    public void onModuleLoad() {
        Widget childOne = new TextArea();
        ComplexPanel p = new LayoutPanel();
        p.add(childOne);
        Panel rp = RootLayoutPanel.get();
        rp.add(p);
    }
}

HTML

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Web Application Starter Project</title>
    <script type="text/javascript" language="javascript" src="hw/hw.nocache.js"></script>
  </head>

  <body>
  </body>
</html>

*。gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='hw'>
  <inherits name='com.google.gwt.user.User'/>
  <entry-point class='foo.client.HW'/>
  <source path='client'/>
  <source path='shared'/>
</module>

1 个答案:

答案 0 :(得分:0)

似乎是一个带有已知修复/解决方法的错误(请参阅https://code.google.com/p/google-web-toolkit/issues/detail?id=4348),但没有人花时间将其作为补丁提交:http://www.gwtproject.org/makinggwtbetter.html

相关问题