Java gwt setEnabled未在Google Chrome上执行
我在一个函数上有一堆setReadOnly,这个函数只有在我需要将窗口置于特殊状态时才被调用 在这个函数中,我不调用任何其他函数或进行任何验证。下面是一个我在这个函数中的示例。我只是改了名字Java gwt setEnabled未在Google Chrome上执行,java,google-chrome,gwt,Java,Google Chrome,Gwt,我在一个函数上有一堆setReadOnly,这个函数只有在我需要将窗口置于特殊状态时才被调用 在这个函数中,我不调用任何其他函数或进行任何验证。下面是一个我在这个函数中的示例。我只是改了名字 public void enableEditMode() { this.btnAjoutContribution.setEnabled(true); this.btnPostal.setEnabled(true); this.type = TypeEdition.TOUT;
public void enableEditMode() {
this.btnAjoutContribution.setEnabled(true);
this.btnPostal.setEnabled(true);
this.type = TypeEdition.TOUT;
// Research
this.noSearch.setReadOnly(true);
this.naSearch.setReadOnly(true);
this.prSearch.setReadOnly(true);
this.daSearch.setReadOnly(true);
this.noCSearch.setReadOnly(true);
this.datSearch.setReadOnly(true);
this.stSearch.setReadOnly(true);
this.modSearch.setReadOnly(true);
this.btnNSearch.setEnabled(false);
// Donr
this.1.setReadOnly(true);
this.2.setReadOnly(false);
this.3.setReadOnly(false);
this.4.setReadOnly(false);
this.5.setReadOnly(false);
this.6.setReadOnly(false);
this.7.setReadOnly(false);
this.8.setReadOnly(false);
this.9.setReadOnly(false);
this.10.setReadOnly(false);
this.11.setReadOnly(false);
this.12.setReadOnly(false);
this.13.setReadOnly(false);
//... about 100 more setReadOnly() on other stuff
//Aff impression. HERE is my problem
this.getActionButtonsWidget().getPrintButton().setVisible(true);
this.getActionButtonsWidget().getPrintButton().setEnabled(false);
}
我的问题是Google Chrome将有一半的时间不会执行我的最后两行。
这是已知的bug吗?我已经在网上研究过了,但还没有发现任何东西。
我使用的是谷歌Chrome的最新版本
这在firefox和ie 8、9、10和11中非常有效
this.btnPostal.getElement().setAttribute("disabled", "disabled");
禁用按钮或输入。在Chrome的控制台中是否看到任何JavaScript错误?是否工作
this.btnPostal.setEnabled(true)代码>?@Andrei Volgin不,控制台和日志上绝对没有任何内容,无论是否显示,它都会正常运行。@Braj刚刚尝试过,不,它不起作用。无论如何谢谢。试试这个this.btnPostal.getElement().setPropertyBoolean(“disabled”,true)代码>基于禁用的值