what is the best way to reload a widget to update it with new data [message #462196] |
Fri, 07 October 2005 18:54 |
Eclipse User |
|
|
|
Originally posted by: tmcguire.go-integral.com
I have a table with a TableViewer and an IStructuredContentProvider.
The underlying data can change for a variety of reasons and I would like
to be able to trigger the table to reload. I don't know how to do this
and I assume there is a proscribed way of doing it.
Tim
|
|
|
Re: what is the best way to reload a widget to update it with new data [message #462198 is a reply to message #462196] |
Fri, 07 October 2005 21:00 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
It depends. Is it the actual setInput(input) that needs to change or is
it the content that the "input" provides.
If it is the input that needs to be changed, you need a listener
somewhere which will put a new input into the TableViewer.
If it is the content that changes but not the input, then your content
provider on the inputChanged message needs to add listeners to the input
and then signal the TableViewer sent in to the input changed method that
it needs to refresh. You can call viewer.refresh() to refresh the entire
table, or viewer.refresh(element) to refresh just the changed element.
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.01949 seconds