I used a tree using Lazy Loading. First-level nodes are created during the creation of the tree, where when child nodes are created only when the user expands a specific node.
Data comes from the database, and we run a database query to populate the child nodes. Implemented by TreeExpansionListener and uses an overridden implementation of the treeExpanded method. When expanding, I delete all the child nodes for the selected node, make a database query and add records as children to the selected node. Before adding a node to the tree, a dummy child is added to the node. Work with DefaultMutableTreeNode.
So far, so good that it worked fine on hold.
Problem 1 - Like you, its calling the database for decomposition, so if the node crashes and is deployed again, I will disable the database and process it again ... The idea is not to load the nodes fresh if they are already expanded .. .
Problem 2 - If I needed to perform a force update, that is, reload the tree and save the extension state. It is now operational ... How can I achieve this with the fix for problem 1 above?
Appreciate any help on this.
source share