JSF:ViewActions 和 preRender 事件之间的区别
我没有使用seam,但我听说seam 的视图操作。我们不能通过预渲染事件来做到这一点吗?执行逻辑并使用导航处理程序进行重定向? 视图操作只是一种更简单的内置方法,还是具有预渲染事件侦听器所没有的任何额外好处?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如您所说,页面(视图)操作是内置的简单方法,并且在 xml 文件中定义此类操作的能力使您的代码非常干净,而且它们对于页面参数(另一个有用的接缝功能)变得更加有用。
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).
以下是有关此问题的 Seam Faces 文档,提供了两者之间的详细深入比较:
http://docs.jboss.org/seam/3/faces/latest/reference/en-US/html/components.html#d0e433
Here's Seam Faces documentation on this question providing a detailed in-depth comparison between both:
http://docs.jboss.org/seam/3/faces/latest/reference/en-US/html/components.html#d0e433