Oh boy this was a bit tricky to find. :)
Please consider the code at the end.
We use DISABLED as readonlydisplay in our form, as you can see.
However, if you do that, this has the very unexpected side-effect that if you click on a textareaitem, the click events are not triggered. It works fine for any other formitem we use, and the below code works if you change the readonlydisplay to something else.
To us this is unfortunate, and it seems strange that it should be expected behavior?
Please consider the code at the end.
We use DISABLED as readonlydisplay in our form, as you can see.
However, if you do that, this has the very unexpected side-effect that if you click on a textareaitem, the click events are not triggered. It works fine for any other formitem we use, and the below code works if you change the readonlydisplay to something else.
To us this is unfortunate, and it seems strange that it should be expected behavior?
Code:
public void onModuleLoad() { TextItem first = new TextItem("name"); TextAreaItem second = new TextAreaItem("area"); final DynamicForm form = new DynamicForm(); form.setCanEdit(false); form.setFields(first, second); //THIS form.setReadOnlyDisplay(ReadOnlyDisplayAppearance.DISABLED); form.addClickHandler(clickEvent -> GWT.log("clicked! " + clickEvent.getSource().toString() + " -> " + System.currentTimeMillis())); form.draw(); }
Comment