[jboss-cvs] jboss-seam/examples/numberguess/view ...
Gavin King
gavin.king at jboss.com
Wed Oct 25 12:03:34 EDT 2006
User: gavin
Date: 06/10/25 12:03:34
Added: examples/numberguess/view lose.jspx numberGuess.jspx
win.jspx
Removed: examples/numberguess/view lose.jsp numberGuess.jsp
win.jsp
Log:
use jspx
Revision Changes Path
1.1 date: 2006/10/25 16:03:34; author: gavin; state: Exp;jboss-seam/examples/numberguess/view/lose.jspx
Index: lose.jspx
===================================================================
<?xml version="1.0"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
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 lose.</title>
</head>
<body>
<h1>You lose.</h1>
We recommend the
<a href="http://mathworld.wolfram.com/Bisection.html">bisection algorithm</a>.
Would you like to <a href="numberGuess.seam">play again</a>?
</body>
</jsp:root>
1.1 date: 2006/10/25 16:03:34; author: gavin; state: Exp;jboss-seam/examples/numberguess/view/numberGuess.jspx
Index: numberGuess.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>Guess a number...</title>
</head>
<body>
<h1>Guess a number...</h1>
<f:view>
<h:form>
<h:messages globalOnly="true"/>
<h:outputText value="Higher!"
rendered="#{numberGuess.randomNumber gt numberGuess.currentGuess}"/>
<h:outputText value="Lower!"
rendered="#{numberGuess.randomNumber lt numberGuess.currentGuess}"/>
<br />
I'm thinking of a number between <h:outputText value="#{numberGuess.smallest}"/> and
<h:outputText value="#{numberGuess.biggest}"/>. You have
<h:outputText value="#{numberGuess.remainingGuesses}"/> guesses.
<br />
Your guess:
<h:inputText value="#{numberGuess.currentGuess}" id="guess" required="true">
<f:validateLongRange maximum="#{numberGuess.biggest}"
minimum="#{numberGuess.smallest}"/>
</h:inputText>
<h:commandButton type="submit" value="Guess" action="guess"/>
<br/>
<h:message for="guess" style="color: red"/>
</h:form>
</f:view>
</body>
</jsp:root>
1.1 date: 2006/10/25 16:03:34; author: gavin; state: Exp;jboss-seam/examples/numberguess/view/win.jspx
Index: win.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 won!</title>
</head>
<body>
<h1>You won!</h1>
<f:view>
Yes, the answer was <h:outputText value="#{numberGuess.currentGuess}" />.
It took you <h:outputText value="#{numberGuess.guessCount}" /> guesses.
Would you like to <a href="numberGuess.seam">play again</a>?
</f:view>
</body>
</jsp:root>
More information about the jboss-cvs-commits
mailing list