faces-flow

How to enter a JSF 2.2 flow with faces-redirect

笑着哭i 提交于 2020-07-04 12:55:07
问题 I've got a basic flow example working: src/main/webapp | |- index.xhtml |- flow1 |- flow1-flow.xml |- flow1.xhtml index.xhtml has a simple form that enters the flow with a parameter: <h:form> Click to enter flow1 <h:commandButton action="flow1" value="Flow 1"> <f:param name="testInput" value="hi there"/> </h:commandButton> </h:form> flow1.xhtml displays the param and lets you enter a value into flow scope: <h:form> Hi this is page 1. <h:inputText label="Enter something:" value="#{flowScope

ContextNotActiveException in simple Faces Flow with CDI

﹥>﹥吖頭↗ 提交于 2019-12-24 00:49:05
问题 Hy all ! I'm on a simple faces flow tutorial (Tutorial) but can't solve following error: 20:43:32,085 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-14) Error Rendering View[/common/signup/signup.xhtml]: javax.el.ELException: /common/signup/signup.xhtml @17,53 value="#{signup.name}": org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.faces.flow.FlowScoped at com.sun.faces.facelets.el.TagValueExpression.getValue

How Catch WELD-001303 Faces Flow

匆匆过客 提交于 2019-12-13 15:44:58
问题 I'm studying the flow faces and implemented something similar as described in http://en.kodcu.com/2013/08/jsf-2-2-use-faces-flow/ have difficulty after leaving the flow if I use the browser back button and click on a button the previous page I get the exception WELD-001303 No active contexts for scope type javax.faces.flow.FlowScoped . Does this happen because the flow has already been destroyed? Is there any possibility of treating this error? Or should I simply redirect to a page when

Flow depending on external parameter?

心已入冬 提交于 2019-12-11 10:31:47
问题 I'm building a simple POC to experiment with Faces Flow. page 1: displays a list of companies. The user selects company A then goes to page 2. page 2: on the selected company page, the user clicks a commandLink to start a wizard to create a new employee to be added to the company A. Behing the scenes I've got a @FlowScoped("addNewUsertoCompanyFlow") bean MyFlowBean . In its @PostConstruct method, the MyFlowBean needs to fetch an object corresponding to the company A from a service ( @Inject )

Starting faces flow

旧巷老猫 提交于 2019-12-10 11:27:56
问题 My question for today is: is it possible to start the faces flow without using h:commandButton component? In my particular case I would like to use the h:selectOneMenu component to start the particular flow based on the value selected by the user. 回答1: The answer is yes, but with a bit of tweaking. To enter a flow, it is required to create a navigation outcome that equals the flows id. UICommand components (like h:commandButton and h:commandLink) can do that but UIInput components can not

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

余生颓废 提交于 2019-12-08 01:57:27
问题 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)? 回答1: 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

How to exit a flow?

末鹿安然 提交于 2019-12-07 05:21:07
问题 Once I've entered a Faces Flow, I want to exit it by going to any page that is not part of the flow. The problem is that the flow is not destroyed if I go outside, for example via an h:link . Indeed, if I click again on a h:commandButton whose action is the flowId, I go back to the previous flow instead of creating a new flow. How to exit a flow without having the user to click explicitly on a h:commandButton whose action corresponds to the return node of the flow ? Is it even possible ? Edit

Exiting a JSF Flow

二次信任 提交于 2019-12-02 07:51:02
问题 I'm starting to use JSF Flows, and after reading some examples and the specs, I got it to work. I'm using the Packaging Flows in Directories method, as described in section 11.4.3.3 of the specification. It seems easier and more in line with the naming conventions already adopted since JSF 2.0. Bellow is my current directory structure. The flow id is wizard . I understand that there is a concept of exiting the flow by calling a return node . You see, by the image above, that I don't have a