Closed rjahn closed 9 years ago
This is how the default Vaadin components (e.g. TextArea) work also. This component tries to follow the same API. (I agree with you that this seems like the wrong design, but I'm trying to mimic the Vaadin TextArea API.)
You have to work around it by first calling setReadOnly(false) http://stackoverflow.com/questions/25192327/programmatically-set-a-textfields-value-while-in-readonly-mode
Understood. It would be a better API design (in my opinion) and less code is alwasy better for developers, but it's by design.
If i try to set a value after setting readonly to true, an Exception will be thrown.
Shouldn't it be possible to set a value via API call in any case?