开发者

How to disable GWT ValueListBox?

开发者 https://www.devze.com 2023-03-03 05:24 出处:网络
ValueListBox doesn\'t implement HasEnabled interface, so I can\'t disable/enable it. And although ListBox implements HasEnabled, method getListBox is private inValueListBox. So I cannot get inner li

ValueListBox doesn't implement HasEnabled interface, so I can't disable/enable it.

And although ListBox implements HasEnabled, method getListBox is private in ValueListBox. So I cannot get inner listBox, to disable it.

Anyone knows how to solve this proble开发者_如何学JAVAm? Thanks in advance.


You can do the following:

DOM.setElementPropertyBoolean(valueListBoxObject.getElement(), "disabled", boolean)

Rest GWT should add a method, which isn't there for now.


You can simply do this:

valueListBoxObject.getElement().setAttribute("disabled", "true");

I've tried it and it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消