<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>SessionAttributes doesn't persist in model in action phase</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121146352" />
  <subtitle>SessionAttributes doesn't persist in model in action phase</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121146352</id>
  <updated>2026-04-05T22:15:32Z</updated>
  <dc:date>2026-04-05T22:15:32Z</dc:date>
  <entry>
    <title>SessionAttributes doesn't persist in model in action phase</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121146351" />
    <author>
      <name>Ovidiu David Dan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121146351</id>
    <updated>2021-09-14T11:45:49Z</updated>
    <published>2021-09-14T09:43:49Z</published>
    <summary type="html">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We are migrating portlets from Liferay 6.2 to Liferay 7.3 but it
  seems the model from rendermapping phase it isn't the same than in
  actionmapping phase &lt;/p&gt;
&lt;p&gt;My code is:&lt;/p&gt;
&lt;p&gt;@Controller&lt;br /&gt; @SessionAttributes(types = { String.class,
  Locale.class, List.class, HashMap.class })&lt;br /&gt;
  @RequestMapping(&amp;quot;VIEW&amp;quot;)&lt;br /&gt; public class
  ControladorPortlet {&lt;/p&gt;
&lt;p&gt;    @RenderMapping&lt;br /&gt;     public String entrada(RenderRequest
  request,Map&amp;lt;String, Object&amp;gt; modeloPagina, RenderResponse resp)
  {&lt;br /&gt;                 modeloPagina.put(&amp;quot;OPERATION&amp;quot;,
  &amp;quot;1&amp;quot;);&lt;br /&gt;               
   //.............................................&lt;br /&gt;               
   return &amp;quot;VISTA&amp;quot;;&lt;/p&gt;
&lt;p&gt;    }&lt;/p&gt;
&lt;p&gt;    @ActionMapping(params = &amp;quot;accion=continuar&amp;quot;)&lt;br /&gt;   
   public void nuevaPagina(PortletRequest portletReq, Map&amp;lt;String,
  Object&amp;gt; modeloPagina,ActionRequest request,&lt;br /&gt;           
   ActionResponse response) {        &lt;br /&gt;           &lt;br /&gt;       
   //Here modeloPagina is empty  and we expect to have the field
  OPERATION&lt;br /&gt;             &lt;br /&gt;     //        &lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;In liferay 6.2 we had spring 4.0 and now we have spring 5.0&lt;/p&gt;
&lt;p&gt;Do you see anything that I may have missed? Any help would be much appreciated.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;SOLVED: It is a bug in portletmvc4spring, 7.2.1 version. https://issues.liferay.com/browse/MVCS-37&lt;/p&gt;</summary>
    <dc:creator>Ovidiu David Dan</dc:creator>
    <dc:date>2021-09-14T09:43:49Z</dc:date>
  </entry>
</feed>
