Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to refresh the Tree Element while expanding
How to refresh the Tree Element while expanding [message #467759] Thu, 10 May 2007 10:27 Go to next message
Eclipse UserFriend
Originally posted by: johansusai.yahoo.co.in

I have created tree using Treeviewer. while expanding the tree element i want to refresh that particular node along with its child. kindly give suggestion on how to do this.

whether to use listener or is there other any way to do it.

Thanks,
johan
Re: How to refresh the Tree Element while expanding [message #467773 is a reply to message #467759] Thu, 10 May 2007 13:10 Go to previous messageGo to next message
Eclipse UserFriend
Johan,

Try using a ITreeContentProvider with your Treeviewer.
ITreeContentProvider#getChildren(Object) will give you the flexibility of
caching your results or always fetching the most current children.

treeviewer.setContentProvider(new ITreeContentProvider() {
// implement interface
});

David

"Johanantonysusai" <johansusai@yahoo.co.in> wrote in message
news:15551278.1178807288426.JavaMail.root@cp1.javalobby.org...
>I have created tree using Treeviewer. while expanding the tree element i
>want to refresh that particular node along with its child. kindly give
>suggestion on how to do this.
>
> whether to use listener or is there other any way to do it.
>
> Thanks,
> johan
Re: How to refresh the Tree Element while expanding [message #467781 is a reply to message #467773] Thu, 10 May 2007 13:35 Go to previous message
Eclipse UserFriend
Hi,

That's not true. When the items are already created the this method is
not called any more. You need to to call treeViewer#refresh(Object).
This will refresh the children from this object.

Tom


David Kyle schrieb:
> Johan,
>
> Try using a ITreeContentProvider with your Treeviewer.
> ITreeContentProvider#getChildren(Object) will give you the flexibility of
> caching your results or always fetching the most current children.
>
> treeviewer.setContentProvider(new ITreeContentProvider() {
> // implement interface
> });
>
> David
>
> "Johanantonysusai" <johansusai@yahoo.co.in> wrote in message
> news:15551278.1178807288426.JavaMail.root@cp1.javalobby.org...
>> I have created tree using Treeviewer. while expanding the tree element i
>> want to refresh that particular node along with its child. kindly give
>> suggestion on how to do this.
>>
>> whether to use listener or is there other any way to do it.
>>
>> Thanks,
>> johan
>
>
Previous Topic:Redirect logs
Next Topic:Eclipse RCP 3.3M6 and Java Web Start
Goto Forum:
  


Current Time: Thu May 22 16:19:52 EDT 2025

Powered by FUDForum. Page generated in 0.04056 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top