Advantages of using JSF Faces Flow instead of the normal navigation system

前端 未结 2 2001
悲&欢浪女
悲&欢浪女 2021-01-15 01:46

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 syst

相关标签:
2条回答
  • 2021-01-15 02:23

    Faces flow and navigation are different. Face flow like business flow in the frond end site, much like wizard.

    0 讨论(0)
  • 2021-01-15 02:25

    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.

    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.

    See also:

    • 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)
    0 讨论(0)
提交回复
热议问题