Skip to content
This repository was archived by the owner on Jan 30, 2019. It is now read-only.

Commit b9e4790

Browse files
author
Arun Gupta
committed
All buttons are now working
Former-commit-id: c5fad05dc95647e268147ddd9ed1135040f7848f
1 parent 77f16d1 commit b9e4790

File tree

7 files changed

+75
-5
lines changed

7 files changed

+75
-5
lines changed

samples/jsf/flows-declarative/src/main/webapp/flow1/flow1-flow.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
<flow-return id="taskFlowReturn1">
5252
<from-outcome>#{flow1Bean.returnValue}</from-outcome>
5353
</flow-return>
54+
<flow-return id="goHome">
55+
<from-outcome>#{flow1Bean.homeValue}</from-outcome>
56+
</flow-return>
5457

5558
<inbound-parameter>
5659
<name>param1FromFlow1</name>

samples/jsf/flows-declarative/src/main/webapp/flow1/flow1b.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<p><h:commandButton id="back" value="back" action="flow1a" /></p>
6060
<p><h:commandButton id="return" value="return" action="taskFlowReturn1" /></p>
6161
<p><h:commandButton id="call2" value="Enter Flow2" action="callFlow2" /></p>
62-
<p><h:commandButton id="index" value="home" action="/index" /></p>
62+
<p><h:commandButton id="index" value="home" action="goHome" /></p>
6363

6464
</h:form>
6565
</body>

samples/jsf/flows-declarative/src/main/webapp/flow2/flow2-flow.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
<flow-return id="taskFlowReturn1">
5252
<from-outcome>#{flow2Bean.returnValue}</from-outcome>
5353
</flow-return>
54+
<flow-return id="goHome">
55+
<from-outcome>#{flow2Bean.homeValue}</from-outcome>
56+
</flow-return>
5457

5558
<inbound-parameter>
5659
<name>param1FromFlow1</name>

samples/jsf/flows-declarative/src/main/webapp/flow2/flow2.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<p><span id="param1FromFlow2">Parameter 1 value from Flow 1: #{flowScope.param1Value}</span></p>
5757
<p><span id="param2FromFlow2">Parameter 2 value from Flow 1: #{flowScope.param2Value}</span></p>
5858

59-
<p><h:commandButton id="index" value="home" action="/index" /></p>
59+
<p><h:commandButton id="index" value="home" action="goHome" /></p>
6060
<p><h:commandButton id="next" value="next" action="flow2a" /></p>
6161
<p><h:commandButton id="nonFlow" value="nonFlow" action="/nonFlow" /></p>
6262

samples/jsf/flows-declarative/src/main/webapp/flow2/flow2a.xhtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@
5555

5656
<p>value: <h:inputText id="input" value="#{flowScope.value}" /></p>
5757

58-
<p><h:commandButton id="start" value="back" action="flow2" /></p>
58+
<p><h:commandButton id="start" value="start" action="flow2" /></p>
59+
<p><h:commandButton id="back" value="back" action="flow2" /></p>
5960
<p><h:commandButton id="next" value="next" action="flow2b" /></p>
60-
<p><h:commandButton id="index" value="home" action="/index" /></p>
61+
<p><h:commandButton id="index" value="home" action="goHome" /></p>
6162

6263
</h:form>
6364
</body>

samples/jsf/flows-declarative/src/main/webapp/flow2/flow2b.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<p><h:commandButton id="back" value="back" action="flow2a" /></p>
6060
<p><h:commandButton id="return" value="return" action="taskFlowReturn1" /></p>
6161
<p><h:commandButton id="call1" value="Enter Flow 1" action="callFlow1" /></p>
62-
<p><h:commandButton id="index" value="home" action="/index" /></p>
62+
<p><h:commandButton id="index" value="home" action="goHome" /></p>
6363

6464
</h:form>
6565
</body>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version='1.0' encoding='UTF-8' ?>
2+
<!--
3+
/*
4+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5+
*
6+
* Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
7+
*
8+
* The contents of this file are subject to the terms of either the GNU
9+
* General Public License Version 2 only ("GPL") or the Common Development
10+
* and Distribution License("CDDL") (collectively, the "License"). You
11+
* may not use this file except in compliance with the License. You can
12+
* obtain a copy of the License at
13+
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
14+
* or packager/legal/LICENSE.txt. See the License for the specific
15+
* language governing permissions and limitations under the License.
16+
*
17+
* When distributing the software, include this License Header Notice in each
18+
* file and include the License file at packager/legal/LICENSE.txt.
19+
*
20+
* GPL Classpath Exception:
21+
* Oracle designates this particular file as subject to the "Classpath"
22+
* exception as provided by Oracle in the GPL Version 2 section of the License
23+
* file that accompanied this code.
24+
*
25+
* Modifications:
26+
* If applicable, add the following below the License Header, with the fields
27+
* enclosed by brackets [] replaced by your own identifying information:
28+
* "Portions Copyright [year] [name of copyright owner]"
29+
*
30+
* Contributor(s):
31+
* If you wish your version of this file to be governed by only the CDDL or
32+
* only the GPL Version 2, indicate your decision by adding "[Contributor]
33+
* elects to include this software in this distribution under the [CDDL or GPL
34+
* Version 2] license." If you don't indicate a single choice of license, a
35+
* recipient has the option to distribute your version of this file under
36+
* either the CDDL, the GPL Version 2 or to extend the choice of license to
37+
* its licensees as provided above. However, if you add GPL Version 2 code
38+
* and therefore, elected the GPL Version 2 license, then the option applies
39+
* only if the new code is made subject to such option by the copyright
40+
* holder.
41+
*/
42+
-->
43+
44+
<!DOCTYPE html>
45+
46+
<html xmlns="http://www.w3.org/1999/xhtml"
47+
xmlns:h="http://java.sun.com/jsf/html">
48+
<head>
49+
<title>Page navigated to upon return from any flow</title>
50+
</head>
51+
<body>
52+
<h1>Page navigated to upon return from any flow</h1>
53+
54+
<h:form prependId="false">
55+
<p>Has a flow: #{null != facesContext.application.flowHandler.currentFlow}.</p>
56+
57+
<p>flowScope value (should be empty): #{flowScope.value}.</p>
58+
59+
<p><h:commandButton id="index" value="home" action="/index" /></p>
60+
61+
</h:form>
62+
</body>
63+
</html>

0 commit comments

Comments
 (0)