If I declare a tree panel in a file say PlanController and pass a dynamically generated store to the panel and then add it to the viewport(card layout), the data gets displayed very well, as shown below:

But if I create a template of the panel in other file(to maintain modularity and readability) and then I set the store into it, data doesnot gets displayed. Though the store gets set properly with all the data present in it.
Code goes below: