I have tree where all leafs have index, when tree is rescursively lodaded form database, database will order tree by indexes. First it gets root nodes sorted by index and so on. Now I need to implement action how user can sort these indexes by pressing up/down arrow icons. When user presses down then index should take index that is under it’s own index and when up arrow is pressed it should do vice versa. I just don’t know what would be best way to implement this kind of functionality.
Share
Since your question is a bit vague, this answer assumes you know what you are doing when it comes to the database stuff (I would reccommend hibernate for java if not) and the following code is meant to give you some ideas for implementing your solution.