I have a View class (extends ViewPart
) that contains a ScrolledForm
created from a FormToolkit
. When certain events happen in other views in the app I want to change the form in this view and have it update in real time to the user.
I have property change support support added now and the following method in the View
public void propertyChange(PropertyChangeEvent event) {
form.dispose();
toolkit.dispose();
createForm( event );
form.redraw();
}
where createForm( event )
recreates the form based on the event.
The problem is that the UI does not display the new form after this. I know the form is created OK because if I drag the border between the View and another view to resize it then the View is immediately updated to show the new form. How can I programmatically force the refresh of the view in the UI?