How to disable GWT ValueListBox?

ValueListBox does not implement the HasEnabled interface, so I cannot disable / enable it.

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

Does anyone know how to solve this problem? Thanks in advance.

+7
source share
2 answers

You can do the following:

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

Rest GWT should add a method that is not yet available.

+14
source

You can simply do this:

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

I tried and it works.

0
source

All Articles