-
Bug
-
Resolution: Fixed
-
Major
-
1.2.1
-
None
-
None
-
Magnolia 4.4.1, Blossom 1.2.1, Tomcat-6, Java 6
It seems as if the ModelMap is not cleared between internal paragraph renders and values from the previous paragraphs ModelMap are accessible in subsequent paragraphs views if not overwritten.
Having two Blossom Controllers, the first returns a model, the second one returns no model for the view.
@Paragraph(name = "test1", value = "Test1")
@Controller
public class TestController1 {
@RequestMapping("/test1.do")
public ModelAndView handleRequest(Content content) throws Exception
@TabFactory("Content")
public void addTab(TabBuilder tab)
}
and
@Paragraph(name = "test2", value = "Test2")
@Controller
public class TestController2 {
@RequestMapping("/test2.do")
public ModelAndView handleRequest(Content content) throws Exception
@TabFactory("Content")
public void addTab(TabBuilder tab)
}
Both views contain just
${text}
TestController1 runs fine. If TestController2 is run for a subsequent paragraph, the view will output "test1" as well, although no Model was returned. Returning an empty Model doesn't fix this either. TestController2 needs to return a ModelMap with the attribute "text" explicitly set to null in order to archieve the desired result.