tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas LE BAS <m...@nlebas.net>
Subject Re: [Tiles + Spring MVC] Render view with API
Date Mon, 27 Feb 2012 15:50:56 GMT

On 12-02-27 05:26 AM, Nguyen Tien Luong wrote:
> - Now I want to include VIEW_NAME_02 in using API instead of tiles:insertDefinition tag.
I tried with TilesContainer and the code is ike that:
> @RequestMapping
> public ModelAndView action(HttpServletRequest request, HttpServletResponse response)
> TilesContainer container = TilesAccess.getContainer(request.getSession().getServletContext());
> container.render("VIEW_NAME_02", request, response);
> Map<String, Object>  model = .... ;
> return new ModelAndView("VIEW_NAME_01", model);
> }
 > Like this in my result I can only see the VIEW_NAME_02 is rendered (I 
also want to show VIEW_NAME_01)

Well, first of all, Spring is not supposed to work that way. Spring 
(specifically the class TilesView) is in charge of calling Tiles' API, 
you shouldn't need to call it yourself. See the documentation here: 

or perhaps you should ask the spring community for help.

That being said, what are you trying to achieve with the API that you 
couldn't do without?


View raw message