annotated controller calling another controller
Hi All,
I have an annotated controller that provide a search. After getting the search results back, I would like to call another controller to edit one of the search item. I have looked into the Book Example. Is there a way that I can make a call to another controller for Edit (rather than making the same call back to the controller)? Both controller has different model (SearchController has a SearchModel and the EditController has a Product Model).
Regards
Jack
You might try a redirect like this when returning a ModelAndView from the first controller. I'm not 100% sure if this is what you're looking for though since this will make the user's browser redirect to a new page.Code:
return new ModelAndView ( quot;redirect:/controller2.htmlquot; );Hi pgrimard,
Both my controllers happen to be a portlet . Is there a way to do this if it is a portlet controller?
Cheers
Jack
Originally Posted by pgrimardYou might try a redirect like this when returning a ModelAndView from the first controller. I'm not 100% sure if this is what you're looking for though since this will make the user's browser redirect to a new page.Code:
return new ModelAndView ( quot;redirect:/controller2.htmlquot; );
I'm not sure to be honest. I haven't worked with portlets. Have you checked the documentation? It's helped me out on numerous occasions. |