TreePanel expanding dynamically
I would like to know how to programmically expand a treepanel node. I have built a treepanel that lazy loads as it should but I need to be able to pick a model from a list that is part of the hierarchy and expand the treepanel to that node. Since, when the treepanel is first initialized just the root node is in the models list it doesn't allow me to expand to the model selected out of the list? If I first load the hierarchy of models for the model I want to expand using the treepanel.getStore().getLoader().loadChildren(model) the loader runs and loads the necessary models but they are not inserted into the treepanel.getStore().getModels() therefore I can't get treepanel.setExpanded(model) to expand them? I know that the loadChildren calls an Async load and I have placed a loadlistener on the loader and I don't try to run setExpanded until the loader has loaded the model I want to expand.