Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getNextLeaf()  RSS feed

 
Bjorn Lundstrom
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
 
Craig Wood
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!