|FilteredSelectionDialog - Internal ContentProvider does not see model changes [message #675806]
||Wed, 01 June 2011 15:15
| Niels Hoffmann
Registered: July 2009
FilteredSelectionDialog's internal ContentProvider does some tricky caching of model data to make sure it runs with high performance.|
This works for most use cases as the model is not likely to change during the dialogs life time.
In my use case however, I want to change the model while the dialog is open.
Unfortunately, all the clever caching prevents the content provider from knowing that the model has changed.
The problem for me is, that the internal ContentProvider remembers the content of the last completed filter run in a field lastCompletedFilter and will not refresh its internal model until "?" gets entered as the search pattern.
In order to circumvent the problem I am using reflection to set the lastCompletedFilter to null, manually and that works.
I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient
way to solve the problem or at least I was not able to see it.
Am I missing something? Is there a right way to do this?
Powered by FUDForum
. Page generated in 0.02636 seconds