• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

getNextLeaf()

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!

I have a problem using the method getNextLeaf(). I have a tree where I have a drag'n'drop solution. After I have removed a leaf(doing dnd), I reload the tree so it will have fresh data, and at that point, I would like to be able to scroll back to the position of the leaf where I was when dragging and dropping the leaf.

Problem:
nodeSelectUnit.getNextLeaf() always returns null. You can use getNextLeaf on a leaf right?

I believe that I have the model updated so that shouldn't be the problem. According to java-doc, null should only be returned if it is the last leaf in the node, but that is not the case here.

Have anyone encountered this problem before?

I really appreciate any input on this subject.

Thanks
Bjorn
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Bjorn Lundstrom
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! I will try it out right away.

Sincerely
Bjorn Lundstrom
 
Bjorn Lundstrom
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, thank you!

I had not saved the reference to the nextLeaf before the removal...what a total idiot I am. Anyway, thanks for helping out. I really appreciate it.

Sincerely
Bjorn Lundstrom
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic