What is the future of Spring Portlet MVC? Long live PortletMVC4Spring!

thumbnail
Neil Griffin, modified 6 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
For more information, see my blog post.
Safet Okic, modified 5 Years ago. New Member Posts: 2 Join Date: 3/6/20 Recent Posts
Hello Neil,
We are currently in the process of migrating to spring 5 for our Liferay 7.1 portal. We are using the portletmvc4spring Project in order to achieve this. So I have a question regarding the implementation of the portletmvc4spring:
In the PortletRequestMappingHandlerAdapter class in the private invokeHandlerMethod on line 1037 the SessionStatus is set to complete for every RenderRequest and ResourceRequest. I there a specific reason why this was done?
Our issue is that we have the old war packaging and deployment of portlets and are using @SessionAttributes in order to preserve the model after the render phase to have it again in an action phase when a user clicks on a button. But with the SessionStatus set to complete the model is removed from the session and we can't get it after the with @ModelAttribute in any of the phases.The specific use case is that we have a specific non admin role that can see inactive users and enable them. So we load all inactive users and display thenm in a table (default render phase), then the user with the specific role can decide if that user should be activated (action phase activated with button press). With the current implementation the @ModelAttribute is the @ActionMapping is calling the initial @ModelAttribute  method since the model has not been stored in the sessionAttributeStore.
Is this a bug on in portletmvc4spring or was this done on purpose?
Regards, Safet Okic