Liferay: what is the relationship and difference between ActionRequest, RenderRequest and PortletRequest?

前端 未结 1 611
遥遥无期
遥遥无期 2021-02-11 09:57

What is the relationship and difference between ActionRequest, RenderRequest and PortletRequest?

Can we get instance of one from a

相关标签:
1条回答
  • 2021-02-11 10:11

    The PortletRequest is the parent of both. An ActionRequest and a RenderRequest are both different types of PortletRequest objects.

    An ActionRequest is valid during the action processing phase of the portlet. During this phase, the portlet hasn't completely decided how it is going to render itself, be it minimized, maximized, in edit mode or in veiw mode, etc.

    On the other hand, the RenderRequest is valid during the rendering phase of the portlet. At this point, the portlet knows how it is going to render itself, and certain changes such as window state, are not allowed.

    If you want to pass the params from action to render, you would need to set the ActionResponse using

    response.setRenderParameter(key,val);  
    

    Then this is available in the corresponding RenderRequest.

    Answer was found here

    0 讨论(0)
提交回复
热议问题