Java GWT-自定义小部件错误:无法读取属性';散列';未定义的

Java GWT-自定义小部件错误:无法读取属性';散列';未定义的,java,gwt,gwt-material-design,Java,Gwt,Gwt Material Design,我是GWT的新手。我想扩展一些标准的小部件来满足我的需要。我已经创建了我的第一个widgethorizontaltab,它扩展了GWT MaterialDesign(and)中的类,我得到一个错误:无法读取未定义的属性“hash” 以下是查看代码: public class HorizontalTabs extends Composite { private static HorizontalTabsUiBinder uiBinder = GWT.create(HorizontalTa

我是GWT的新手。我想扩展一些标准的小部件来满足我的需要。我已经创建了我的第一个widget
horizontaltab
,它扩展了GWT MaterialDesign(and)中的类,我得到一个错误:
无法读取未定义的属性“hash”

以下是查看代码:

public class HorizontalTabs extends Composite {

    private static HorizontalTabsUiBinder uiBinder = GWT.create(HorizontalTabsUiBinder.class);

    interface HorizontalTabsUiBinder extends UiBinder<Widget, HorizontalTabs> {
    }
 public HorizontalTabs() {
    initWidget(uiBinder.createAndBindUi(this));
    }
}

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
    xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:m="urn:import:gwt.material.design.client.ui">
    <m:MaterialRow>
        <m:MaterialRow>
            <m:MaterialColumn grid="s12">
                <m:MaterialTab ui:field="tab" backgroundColor="blue" indicatorColor="yellow" waves="YELLOW">

                </m:MaterialTab>
            </m:MaterialColumn>
        </m:MaterialRow>
        <m:MaterialRow ui:field="tabContentRow">

        </m:MaterialRow>
    </m:MaterialRow>
</ui:UiBinder> 
我认为这是一个愚蠢的问题,但我真的找不到解决办法。请帮忙


也许有办法找到原因,但对我来说,当我需要查找运行时异常时,调试GWT应用程序非常困难。

可能是因为我没有任何用于小部件模型对象的公共getter、setter和构造函数。但现在我不确定。它开始工作。

在我这边,你的两个小部件都工作得很好(没有gwtp类),我觉得没有什么问题。尝试调试应用程序以找出导致问题的文件。
public class FilesView extends ViewWithUiHandlers<FilesUiHandlers> implements FilesPresenter.MyView {
    interface Binder extends UiBinder<Widget, FilesView> {}
    private static FilesViewUiBinder uiBinder = GWT.create(FilesViewUiBinder.class);
    interface FilesViewUiBinder extends UiBinder<Widget, FilesView> {}
    @UiField
    MaterialRow row;
    public FilesView() {
    initWidget(uiBinder.createAndBindUi(this));
    row.add(new HorizontalTabs());
    }

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
        xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:m="urn:import:gwt.material.design.client.ui">
    <g:HTMLPanel>
        <h2>Your files</h2>
        <m:MaterialRow>
            <m:MaterialRow ui:field="row">
            </m:MaterialRow>
        </m:MaterialRow>
    </g:HTMLPanel>
</ui:UiBinder>
SEVERE: Exception caught: Exception caught: Exception caught: Exception caught: Exception caught: Exception caught: (TypeError) : Cannot read property 'hash' of undefinedcom.google.gwt.user.client.ui.AttachDetachException: Exception caught: Exception caught: Exception caught: Exception caught: Exception caught: Exception caught: (TypeError) : Cannot read property 'hash' of undefined
    at Unknown.fillInStackTrace_0_g$(cms-0.js@3:8443)
    at Unknown.Throwable_3_g$(cms-0.js@8:8398)
    at Unknown.Exception_3_g$(cms-0.js@18:8541)
    at Unknown.RuntimeException_3_g$(cms-0.js@18:8582)
    at Unknown.UmbrellaException_3_g$(cms-0.js@25:36497)
    at Unknown.UmbrellaException_5_g$(cms-0.js@26:36558)
    at Unknown.AttachDetachException_1_g$(cms-0.js@26:55009)
    at Unknown.tryCommand_1_g$(cms-0.js@11:55065)
    at Unknown.doAttachChildren_1_g$(cms-0.js@3:54662)
    at Unknown.onAttach_2_g$(cms-0.js@8:54494)
    at Unknown.setParent_2_g$(cms-0.js@12:54590)
    at Unknown.adopt_0_g$(cms-0.js@14:54649)
    at Unknown.add_14_g$(cms-0.js@8:54707)
    at Unknown.add_13_g$(cms-0.js@8:54700)
    at Unknown.add_66_g$(cms-0.js@8:77215)
    at Unknown.add_11_g$(cms-0.js@8:54637)
    at Unknown.add_65_g$(cms-0.js@43:77211)
    at Unknown.setPanelContent_0_g$(cms-0.js@54:114885)
    at Unknown.setInSlot_7_g$(cms-0.js@25:107982)
    at Unknown.setInSlot_1_g$(cms-0.js@25:73077)
    at Unknown.setInSlot_0_g$(cms-0.js@8:73066)
    at Unknown.execute_27_g$(cms-0.js@30:76290)
    at Unknown.$executeScheduled_0_g$(cms-0.js@40:11660)
    at Unknown.runScheduledTasks_0_g$(cms-0.js@9:11382)
    at Unknown.flushPostEventPumpCommands_0_g$(cms-0.js@5:11474)
    at Unknown.execute_5_g$(cms-0.js@22:11613)
    at Unknown.execute_4_g$(cms-0.js@19:11350)
    at Unknown.apply_0_g$(cms-0.js@28:10845)
    at Unknown.entry0_0_g$(cms-0.js@16:10901)
    at Unknown.anonymous(cms-0.js@14:10881)
    at Unknown.callback_0_g$(cms-0.js@45:11401)
Caused by: com.google.gwt.user.client.ui.AttachDetachException: Exception caught: Exception caught: