使用JSF Faces Flow代替常规导航系统的优势 [英] Advantages of using JSF Faces Flow instead of the normal navigation system

查看:60
本文介绍了使用JSF Faces Flow代替常规导航系统的优势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在探索JSF 2.2 Faces Flow功能,但是我仍然不确定使用Faces Flow而不是使用常规导航系统(在链接或按钮中调用facelet)定义流有什么好处?

I'm exploring the JSF 2.2 Faces Flow feature but I'm still not sure what are the advantages of defining a flow using Faces Flow instead of using the normal navigation system (calling facelets in links or buttons)?

推荐答案

仅在要在给定视图集上使用@FlowScoped bean时才使用它.换句话说,仅当您希望托管的Bean只要在流配置文件中注册的指定视图集合中导航时才存在,才使用它.

Only use it if you want to use a @FlowScoped bean on a given set of views. In other words, only use it if you want a managed bean which should live as long as you're navigating through the specified collection of views registered in the flow configuration file.

在现实世界中,确实有很少的用例.他们全都归结为一个多步骤向导,每个步骤都可以添加书签.以前,在引入流作用域之前,为此会使用有条件的呈现包含,但由于URL始终保持不变,因此它们不能单独添加书签.

There are indeed very few real world use cases for this. They all boil down to a multi-step wizard of which each step is bookmarkable. Previously, before the introduction of the flow scope, one would use conditionally rendered includes for this, but they are in turn not individually bookmarkable, because the URL stays the same all the time.

  • What is new in JSF 2.2? - Faces Flow
  • Java EE 7 tutorial - Using Faces Flows
  • How to navigate in JSF? How to make URL reflect current page (and not previous one)

这篇关于使用JSF Faces Flow代替常规导航系统的优势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆