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.
精彩评论