Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/375.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在层次结构[GWT]中的指定点插入节点_Java_Javascript_Gwt - Fatal编程技术网

Java 无法在层次结构[GWT]中的指定点插入节点

Java 无法在层次结构[GWT]中的指定点插入节点,java,javascript,gwt,Java,Javascript,Gwt,我创建了一个类似 public class FinalizeEvalutionReportPanel extends VerticalPanel{ //other code... public class PopupPanel extends DialogBox { public PopupPanel() { this.setStyleName("gwt-DialogBoxNew"); this.setT

我创建了一个类似

public class FinalizeEvalutionReportPanel extends VerticalPanel{

    //other code...

    public class PopupPanel extends DialogBox
    {
        public PopupPanel() {
            this.setStyleName("gwt-DialogBoxNew");
            this.setText(WorkFlowUtil.getPropertyValue(propertyKeys.showAgreement));
            this.setWidth(StringUtil.getWidthByGivenPercentage(30)+"px");
            this.add(this);
            this.center();
            addHandler();
        }
        private void addHandler() {
            final DialogBox box=this;
            giveFeedbackBtn.addClickHandler(new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                    box.hide();
                }
            });
        }
    }

}
我试着叫它,从别的班上点击按钮

showAgreementBtn.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
        new FinalizeEvalutionReportPanel().showPopUp();//this give Java Script error

        }
    });
我犯了这个错误

com.google.gwt.core.client.JavaScriptException:(NS_ERROR\u DOM\u HIERARCHY\u REQUEST\u ERR)@com.google.gwt.DOM.client.Node::appendChild(Lcom/google/gwt/DOM/client/Node;)([JavaScript object(7280)]:无法在层次结构中的指定点插入节点


问题可能出在下一行:

this.add(this);
不能添加组件本身