Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
SessionAttributes doesn't persist in model in action phase
Hello,
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
My code is:
@Controller
@SessionAttributes(types = { String.class,
Locale.class, List.class, HashMap.class })
@RequestMapping("VIEW")
public class
ControladorPortlet {
@RenderMapping
public String entrada(RenderRequest
request,Map<String, Object> modeloPagina, RenderResponse resp)
{
modeloPagina.put("OPERATION",
"1");
//.............................................
return "VISTA";
}
@ActionMapping(params = "accion=continuar")
public void nuevaPagina(PortletRequest portletReq, Map<String,
Object> modeloPagina,ActionRequest request,
ActionResponse response) {
//Here modeloPagina is empty and we expect to have the field
OPERATION
//
}
In liferay 6.2 we had spring 4.0 and now we have spring 5.0
Do you see anything that I may have missed? Any help would be much appreciated.
SOLVED: It is a bug in portletmvc4spring, 7.2.1 version. https://issues.liferay.com/browse/MVCS-37
Powered by Liferay™