Liferay:ActionRequest,RenderRequest和PortletRequest之间的关系和区别是什么? [英] Liferay: what is the relationship and difference between ActionRequest, RenderRequest and PortletRequest?
问题描述
ActionRequest
,RenderRequest
和PortletRequest
之间的关系和区别是什么?
我们可以从另一个实例中获取一个实例吗?
PortletRequest
是两者的父级. ActionRequest
和RenderRequest
都是PortletRequest
对象的不同类型.
ActionRequest
在portlet的动作处理阶段有效.在此阶段,portlet尚未完全决定如何呈现自己,无论是最小化,最大化,在编辑模式下还是在veiw模式下等等.
另一方面,RenderRequest
在portlet的呈现阶段有效.此时,Portlet知道它将如何呈现自己,并且不允许某些更改(例如窗口状态).
如果要将参数从动作传递到渲染,则需要设置ActionResponse
使用
response.setRenderParameter(key,val);
然后在相应的RenderRequest
中可用.
在此处找到答案 >
What is the relationship and difference between ActionRequest
, RenderRequest
and PortletRequest
?
Can we get instance of one from another?
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
.
这篇关于Liferay:ActionRequest,RenderRequest和PortletRequest之间的关系和区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!