File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFace TreeViewer Databinding: Tree not reflecting changes

 
Blue Job
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a tree which displays like this:

The tree displays correctly but the problem is, when I add an item, the tree does not update/refresh automatically. I still need to explicitly call the refresh() function (See creating the tree part). The model and the tree should be in sync right? The changes should appear in the tree automatically, no need to explicitly call refresh().

I think the problem is in the second parameter of ViewerSupport.bind(), the object input:

Creating the tree:

Models:
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
Blue Job
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry I forgot to specify that I'm talking about JFace TreeViewer and what I am trying to achieve here is bidirectional databinding.

It's GUI stuff, but did I post this in a wrong place?
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No you posted in the correct forum. However we do not see much activity besides Swing.
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take action on the PM I had sent. It is not optional.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic