My debugging session showed me that calling setVisible(false) then setVisible(true) on a server side component of a widget causes the widget to be reinstantiated. Thats essentially means every time I hide and show my widget the default constructor will be called.
My problem is I have and underlying VTextField instance in my widget which loses its value when that happens. I create the VTextField in the constructor with
textField = GWT.create(VTextField.class);
and save it in a private final field. I set the textfield text with the setText method.
How do I keep the textfield’s text after reinstantiating the whole widget?