I'm trying to create a View that has a JTree on the left and a JPanel on the right that shows the properties of the currently selected TreeNode. Ideally, the JTree and the JPanel would be contained by a JSplitPane.
The data in the JTree is a tree of countries, each country's provinces (i.e. states) and each province's cities. For example:
When you select a country in the tree, the properties panel on the right displays that country's name, country code and other properties. When you select a province, the panel displays that province's name, province code and other properties. When you select a city...well, you get the idea! Of course, the exact properties that get displayed on the panel depend on the type of the selected tree node.Code:Countries (root node) |----Canada |----British Columbia |----Vancouver |----Victoria |----Ontario |----Ottawa |----Toronto |----USA |----California |----San Francisco |----San Jose |----Washington |----Seattle |----Redmond
Using the VetManagerView in the Petclinic sample as a starting point, I was easily and quickly able to display the tree and populate it with data. Now I want to add the properties panel to the right side. How should I structure this in terms of Spring Rich Client classes? In other words, which Spring Rich Client classes should I be using? In particular, which implementation of FormModel (if any) should I use as backing for the properties panel?
I looked for examples in this forum but I couldn't find anything that exactly fit my requirements. Any help (especially sample code) would be greatly appreciated. For now, I'll keep plugging away at it.
Joe


Reply With Quote