0

I want to implement ThreeColumnLayout for my web-app. E.g. having NavigationComponent, BookmarkComponent in Left Panel, OnlineUserComponent in Right Panel.

There are also some more components, which can be made visual/hidden by User dynamically and User can move components here and there. E.g. from Left Panel to Right Panel and/or change the vertical order of components.

But I think Spring MVC does not have support for this out-of-box. I don't want to "intercept" each and every ModelAndView (one that is passed to HandlerInterceptor#postHandle() method) to add my components related modelAttribute and other objects (it looks ugly).

I Googled bit and two names were coined: Tiles and SiteMesh. I have not used any of these yet! So my question is: "Which one works better with Spring MVC 3 and fulfills my requirements (mentioned above)?"

Is there any other (Spring MVC 3 compatible) decoration technology?

I'm using JSP as view.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
dira
  • 30,304
  • 14
  • 54
  • 69

1 Answers1

1

Apache Tiles is the best bet for this. Each component can be a single tile, which can have a view (a jsp in your case) and a ViewPreparer associated with it.

SiteMesh offers you very limited control over the areas of the HTML document - basically you just get to insert the head, body and title. You might want to use SiteMesh to provide a decorator containing the HTML structure which contains the tiles themselves.

Mark Chorley
  • 2,087
  • 2
  • 22
  • 29