0

我正在使用 GWT 和在 glassfish 中运行的 GWT-EXT。我创建了 2 个组合框,如下所示:


import com.extjs.gxt.ui.client.widget.form.ComboBox;
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox;

this.contentPanel = new ContentPanel();
this.contentPanel.setFrame(true);
this.contentPanel.setSize((int)(Window.getClientWidth()*0.95), 600);
this.contentPanel.setLayout(new FitLayout());
initWidget(this.contentPanel);

SimpleComboBox<String> combo = new SimpleComboBox<String>();
combo.setEmptyText("Select a topic...");
combo.add("String1");
combo.add("String2");
this.contentPanel.add(combo);

ComboBox combo1 = new ComboBox();
combo1.setEmptyText("Select a topic...");
ListStore topics = new ListStore();
topics.add("String3");
topics.add("String4");
combo.setStore(topics);
this.contentPanel.add(combo1);

在浏览器(IE 8.0、Firefox 3.6.6 或 Chrome 10.0)中加载这些组合框时,会显示组合框,但没有下拉箭头。它们看起来像带有“选择主题...”文本的文本字段。当您选择文本时,它会消失,如果您键入一个字符然后删除它,则会显示选项(即调用下拉),但是仍然没有下拉箭头。

有谁知道问题可能是什么?或者我该如何进一步调查?是否可以看到浏览器获取的实际 HTML,当我查看页面源时,我只获得登录页面 HTML。

另外,我还有一个无法正确呈现的导入 com.google.gwt.user.client.ui.Grid。它是表格格式,但没有网格线或标题栏等。

干杯,

詹姆士

这是有问题的 HTML DIV:

<div class=" x-form-field-wrap  x-component" id="x-auto-5" style="width: 150px;">
    <input type="text" class=" x-form-field x-form-text  x-form-empty-field" id="x-auto-5-input" tabindex="0" autocomplete="off" style="width: 126px;">
    <img class="x-form-trigger x-form-trigger-arrow" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" id="x-auto-6">
</div>

我相信指定的图像是空白图像。为什么它不使用箭头图像肯定是默认的 GWT/浏览器图像?

4

3 回答 3

1

FireBug 将是您与 FireFox 的最佳朋友。您可以检查所有内容、css 文件、html 或 javascript。我确实有类似的问题,我的问题与丢失的图像文件有关。我确实是通过萤火虫找到的..

于 2011-01-10T08:49:10.133 回答
0

我的 Landing html 页面缺少以下内容。好吧,我有参考,但它指向错误的相对位置。

<link rel="stylesheet" type="text/css" href="extgwt/css/gxt-all.css" />
于 2011-01-11T12:56:45.983 回答
0

如果您将 GWT 与 GWT-EXT 一起使用,那么为什么要使用 EXT-JS 的组合框,请使用 GWT-EXT 的组合框。

于 2011-01-10T11:13:17.287 回答