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

Commit 98009b1

Browse files
author
Arun Gupta
committed
Most of the buttons are working
Former-commit-id: 2fb58e6708ca8e29fbc44e0437e8dedda9606b90
1 parent da4d874 commit 98009b1

File tree

11 files changed

+27
-17
lines changed

11 files changed

+27
-17
lines changed

samples/jsf/flow-multi/src/main/java/org/glassfish/flowmulti/Flow1.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public Flow defineFlow(@FlowBuilderParameter FlowBuilder flowBuilder) {
6060

6161
flowBuilder.returnNode("taskFlowReturn1").
6262
fromOutcome("#{flow1Bean.returnValue}");
63+
flowBuilder.returnNode("goHome").
64+
fromOutcome("#{flow1Bean.homeValue}");
6365

6466
flowBuilder.inboundParameter("param1FromFlow2", "#{flowScope.param1Value}");
6567
flowBuilder.inboundParameter("param2FromFlow2", "#{flowScope.param2Value}");

samples/jsf/flow-multi/src/main/java/org/glassfish/flowmulti/Flow1Bean.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public String getName() {
5555
}
5656

5757
public String getReturnValue() {
58-
return "/return1";
58+
return "/return";
5959
}
60+
61+
public String getHomeValue() {
62+
return "/index";
63+
}
6064
}

samples/jsf/flow-multi/src/main/java/org/glassfish/flowmulti/Flow2Bean.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public String getName() {
5555
}
5656

5757
public String getReturnValue() {
58-
return "/return1";
58+
return "/return";
59+
}
60+
61+
public String getHomeValue() {
62+
return "/index";
5963
}
6064
}

samples/jsf/flow-multi/src/main/webapp/flow1/flow1a.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
<p><h:commandButton id="start" value="back" action="flow1" /></p>
5959
<p><h:commandButton id="flow1b" value="next" action="flow1b" /></p>
60-
<p><h:commandButton id="index" value="home" action="/index" /></p>
60+
<p><h:commandButton id="index" value="home" action="goHome" /></p>
6161

6262
</h:form>
6363
</body>

samples/jsf/flow-multi/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="call2" /></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/flow-multi/src/main/webapp/flow2/flow2-flow.xml

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

5561
<inbound-parameter>
5662
<name>param1FromFlow1</name>

samples/jsf/flow-multi/src/main/webapp/flow2/flow2.xhtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
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="home" value="home" action="goHome" /></p>
6060
<p><h:commandButton id="next" value="next" action="flow2a" /></p>
61-
<p><h:commandButton id="nonFlow" value="nonFlow" action="/nonFlow" /></p>
61+
<p><h:commandButton id="nonFlow" value="nonFlow" action="nonFlow" /></p>
6262

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

samples/jsf/flow-multi/src/main/webapp/flow2/flow2a.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
<p><h:commandButton id="start" value="back" action="flow2" /></p>
5959
<p><h:commandButton id="next" value="next" action="flow2b" /></p>
60-
<p><h:commandButton id="index" value="home" action="/index" /></p>
60+
<p><h:commandButton id="home" value="home" action="goHome" /></p>
6161

6262
</h:form>
6363
</body>

samples/jsf/flow-multi/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="home" value="home" action="goHome" /></p>
6363

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

samples/jsf/flow-multi/src/main/webapp/index.xhtml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343

4444
<!DOCTYPE html>
4545
<html xmlns="http://www.w3.org/1999/xhtml"
46-
xmlns:h="http://java.sun.com/jsf/html"
47-
xmlns:f="http://java.sun.com/jsf/core">
46+
xmlns:h="http://java.sun.com/jsf/html">
4847

4948
<head>
5049
<title>Outside of flow</title>
@@ -53,13 +52,8 @@
5352
<h1>Outside of Flow</h1>
5453

5554
<h:form prependId="false">
56-
<p><h:commandButton id="start1" value="Enter Flow1" action="flow1">
57-
<f:attribute name="toFlowDocumentId" value=""/>
58-
</h:commandButton></p>
59-
<p><h:commandButton id="start2" value="Enter Flow2" action="flow2">
60-
<f:attribute name="toFlowDocumentId" value=""/>
61-
</h:commandButton></p>
62-
<p><h:commandButton id="stay" value="stay" /></p>
55+
<p><h:commandButton id="start1" value="Enter Flow1" action="flow1"/></p>
56+
<p><h:commandButton id="start2" value="Enter Flow2" action="flow2"/></p>
6357
</h:form>
6458
</body>
6559
</html>

0 commit comments

Comments
 (0)