开发者

How to disable GWT ValueListBox?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜