[jboss-cvs] jboss-seam/examples/numberguess/view ...
Gavin King
gavin.king at jboss.com
Thu Nov 16 10:36:23 EST 2006
User: gavin
Date: 06/11/16 10:36:23
Modified: examples/numberguess/view numberGuess.jspx win.jspx
Added: examples/numberguess/view cheat.jspx confirm.jspx
Log:
add nested pageflow
Revision Changes Path
1.2 +2 -1 jboss-seam/examples/numberguess/view/numberGuess.jspx
(In the diff below, changes in quantity of whitespace are not shown.)
Index: numberGuess.jspx
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/numberguess/view/numberGuess.jspx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- numberGuess.jspx 25 Oct 2006 16:03:34 -0000 1.1
+++ numberGuess.jspx 16 Nov 2006 15:36:23 -0000 1.2
@@ -30,7 +30,8 @@
<f:validateLongRange maximum="#{numberGuess.biggest}"
minimum="#{numberGuess.smallest}"/>
</h:inputText>
- <h:commandButton type="submit" value="Guess" action="guess"/>
+ <h:commandButton value="Guess" action="guess"/>
+ <h:commandButton value="Cheat" action="#{numberGuess.beginCheat}" immediate="true"/>
<br/>
<h:message for="guess" style="color: red"/>
</h:form>
1.2 +1 -0 jboss-seam/examples/numberguess/view/win.jspx
(In the diff below, changes in quantity of whitespace are not shown.)
Index: win.jspx
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/numberguess/view/win.jspx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- win.jspx 25 Oct 2006 16:03:34 -0000 1.1
+++ win.jspx 16 Nov 2006 15:36:23 -0000 1.2
@@ -16,6 +16,7 @@
<f:view>
Yes, the answer was <h:outputText value="#{numberGuess.currentGuess}" />.
It took you <h:outputText value="#{numberGuess.guessCount}" /> guesses.
+ <h:outputText value="But you cheated, so it doesn't count!" rendered="#{numberGuess.cheat}"/>
Would you like to <a href="numberGuess.seam">play again</a>?
</f:view>
</body>
1.1 date: 2006/11/16 15:36:23; author: gavin; state: Exp;jboss-seam/examples/numberguess/view/cheat.jspx
Index: cheat.jspx
===================================================================
<?xml version="1.0"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns="http://www.w3.org/1999/xhtml"
version="2.0">
<jsp:output doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<jsp:directive.page contentType="text/html"/>
<head>
<title>You cheater!</title>
</head>
<body>
<h1>You cheater!</h1>
<f:view>
<h:form>
(The answer is <h:outputText value="#{numberGuess.randomNumber}"/>.)
<h:commandButton value="Done"/>
</h:form>
</f:view>
</body>
</jsp:root>
1.1 date: 2006/11/16 15:36:23; author: gavin; state: Exp;jboss-seam/examples/numberguess/view/confirm.jspx
Index: confirm.jspx
===================================================================
<?xml version="1.0"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns="http://www.w3.org/1999/xhtml"
version="2.0">
<jsp:output doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<jsp:directive.page contentType="text/html"/>
<head>
<title>Do you really want to cheat?</title>
</head>
<body>
<h1>Do you really want to cheat?</h1>
<f:view>
<h:form>
I'll be really disappointed if you do this...
<h:commandButton value="Yes" action="yes"/>
<h:commandButton value="No" action="no"/>
</h:form>
</f:view>
</body>
</jsp:root>
More information about the jboss-cvs-commits
mailing list