Reputation: 3484
Hello I am using spring mvc and my page consist of 2 columns left and right. I want that left side is rendered from one controller and right side is rendered another one. How to accomplish that. Fore example in the right side here is login form which renders from LoginController but the left side changes all time. How to accomplish it with spring mvc framework.
thanks in advance.
Upvotes: 0
Views: 316
Reputation: 27614
Spring MVC is not inherently a component-oriented framework, like you seem to want. Some different approaches that might suit you
Upvotes: 2
Reputation: 340873
There are various ways to implement this. What are your exact requirements? You can try:
Portlets - render two portlets, each is rendered separately. Probably an overkill if this is needed only in this one place.
AJAX - Render an empty page first and fetch both views separately using AJAX. See $.load()
.
<iframe/>
- embed iframes with two different target URLs.
Use component-oriented framework (I personally like Wicket).
None of these approaches are tied Spring MVC or even Java.
Upvotes: 1