Announcement Announcement Module
Collapse
No announcement yet.
Implementing Tree Nav Menu Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Implementing Tree Nav Menu

    Hi all,

    I'm still rather new to Java and Spring (been doing this for the past three months or so) and need some pointers on implementing our app's view. Specifically, I need to implement a dynamic tree menu on the left of the screen that is consistent throughout our application, which displays the proper view on the main right panel according to what was clicked.

    Originally, the layout of each view had navigation links within each page depending on what the controller returned as the model and view. The tree menu I worked on would need all links throughout the entire app. This would look and function something like a Windows file explorer tree, where clicking on a node to the left will reflect a new view in the main panel.

    What I did was include a NavBar.jsp page and included that into every view within the app. I know that's bad, but we had to meet a demo deadline. There was a problem with this: My NavBar.jsp page would try to access all the models available within the app to display what I needed in the tree. However, each view's controller only returned a subset of all the models. I had to hack away at it somewhat by modifying each controller to include every model that I needed within that particular view.

    Another I issue that I need to resolve is keeping the state of the tree's expanded and collapsed nodes so that it is consistent. B/c the entire page refreshes now, the tree is always in its initial collapsed state.

    Has anyone had any similar experiences?

    My initial research has given me some direction towards chaining controllers. A recent post talked about implementing a controller with configurable views with DI. (http://forum.springframework.org/showthread.php?t=16994) Are there other possible soultions out there?

    As for the state of the tree, is there a frame like method of keeping the tree static or maintaining its states? Since nodes on the tree may be added or deleted (adding a company, delting a company), I have to keep that in mind as well.

    Thanks in advance to all you guys in the forums. I'm a newb in sw development and have learned a lot from reading your posts!
Working...
X