[ 
http://jira.magnolia-cms.com/browse/BLOSSOM-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tobias Mattsson updated BLOSSOM-40:
-----------------------------------

    Attachment: magnolia-module-blossom-1.2.2-SNAPSHOT.jar

> Model not emptied after rendering of paragraph completes
> --------------------------------------------------------
>
>                 Key: BLOSSOM-40
>                 URL: http://jira.magnolia-cms.com/browse/BLOSSOM-40
>             Project: Magnolia Blossom Module
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: Magnolia 4.4.1, Blossom 1.2.1, Tomcat-6, Java 6
>            Reporter: Philipp Gaschütz
>            Assignee: Tobias Mattsson
>            Priority: Critical
>         Attachments: magnolia-module-blossom-1.2.2-SNAPSHOT.jar
>
>
> 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 {
>               HashMap x = new HashMap<String, String>();
>               x.put("text", "test1");
>               return new ModelAndView("/test1", x);
>       }
>       @TabFactory("Content")
>       public void addTab(TabBuilder tab) {tab.addHidden("bogus", "bogus");}
> }
> and
> @Paragraph(name = "test2", value = "Test2")
> @Controller
> public class TestController2 {
>       @RequestMapping("/test2.do")
>       public ModelAndView handleRequest(Content content) throws Exception {
>               return new ModelAndView("/test2");
>       }
>               
>       @TabFactory("Content")
>       public void addTab(TabBuilder tab) { tab.addHidden("bogus", "bogus"); }
> }
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to