JSF:ViewActions和preRender事件之间的区别

时间:2021-11-26 19:12:02

I'm not working with seam but i hear about seam's view actions. Can't we do that already with prerender event? executing logic and using the navigation handler to redirect? Are view actions just an easier, built-in approach or do they have any extra benefit that prerender event listener doesn't have?

我没有使用接缝,但我听说过接缝的视图动作。我们不能用prerender事件做到这一点吗?执行逻辑并使用导航处理程序重定向?视图操作是一种更简单的内置方法,还是它们具有prerender事件监听器所没有的额外好处?

2 个解决方案

#1


0  

as you said page(view) actions are built-in easy approach, and abilitiy to define such actions in xml files keep your code really very clean and also they become more usefull with page params (another useful seam feature).

正如你所说的页面(视图)动作是内置的简单方法,并且很容易在xml文件中定义这样的动作,使你的代码非常干净,并且它们对于页面参数(另一个有用的接缝特征)变得更有用。

#2


0  

Here's Seam Faces documentation on this question providing a detailed in-depth comparison between both:

这是关于这个问题的Seam Faces文档,提供了两者之间的详细深入比较:

http://docs.jboss.org/seam/3/faces/latest/reference/en-US/html/components.html#d0e433

#1


0  

as you said page(view) actions are built-in easy approach, and abilitiy to define such actions in xml files keep your code really very clean and also they become more usefull with page params (another useful seam feature).

正如你所说的页面(视图)动作是内置的简单方法,并且很容易在xml文件中定义这样的动作,使你的代码非常干净,并且它们对于页面参数(另一个有用的接缝特征)变得更有用。

#2


0  

Here's Seam Faces documentation on this question providing a detailed in-depth comparison between both:

这是关于这个问题的Seam Faces文档,提供了两者之间的详细深入比较:

http://docs.jboss.org/seam/3/faces/latest/reference/en-US/html/components.html#d0e433