Search code examples
javagwtgxt

How to get checkBox readOnly state in Gxt 3.1.1 like there is isReadOnly() method in gxt 3.0.0?


I am trying to implement something like the below code in my projeect using Gxt 3.1.1 :

CheckBox checkBx = new CheckBox();
checkBx.setReadOnly(False);

System.out.println(checkBx.isReadOnly());

While this snippet will ru nwell on Gxt 3.0.0 but with 3.1.1 its showing the last line as unsupported. Also there is no method to get ReadOnly state. How can I implement any method for such functionality ?


Solution

  • This is an API change from 3.0.3 (See https://docs.sencha.com/gxt/3.1/announcements/release_notes.html):

    Backwards incompatible - CheckBox and Radio no longer support setting the readOnly attribute (only supported by text and passwords inputs)

    You can use setEnabled() and isEnabled() instead.