Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fdb031
commit c7a55b1
Showing
4 changed files
with
52 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faces-config version="2.0" | ||
xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"> | ||
|
||
xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation=" | ||
http://java.sun.com/xml/ns/javaee | ||
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"> | ||
</faces-config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:ui="http://java.sun.com/jsf/facelets" | ||
xmlns:h="http://java.sun.com/jsf/html" | ||
xmlns:f="http://java.sun.com/jsf/core"> | ||
xmlns:ui="http://java.sun.com/jsf/facelets" | ||
xmlns:h="http://java.sun.com/jsf/html" | ||
xmlns:f="http://java.sun.com/jsf/core"> | ||
|
||
<ui:composition template="template.xhtml"> | ||
<ui:define name="content"> | ||
<h1>Guess a number...</h1> | ||
<h:form id="NumberGuessMain"> | ||
<div style="color: red"> | ||
<h:messages id="messages" globalOnly="false"/> | ||
<h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess and game.guess ne 0}"/> | ||
<h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess and game.guess ne 0}"/> | ||
</div> | ||
|
||
<div> | ||
I'm thinking of a number between #{game.smallest} and #{game.biggest}. You have #{game.remainingGuesses} guesses. | ||
</div> | ||
|
||
<div> | ||
Your guess: | ||
<h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}" | ||
validator="#{game.validateNumberRange}"> | ||
</h:inputText> | ||
<h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/> | ||
</div> | ||
<div> | ||
<h:commandButton id="RestartButton" value="Reset" action="#{game.reset}" immediate="true" /> | ||
</div> | ||
</h:form> | ||
</ui:define> | ||
</ui:composition> | ||
<ui:composition template="/template.xhtml"> | ||
<ui:define name="content"> | ||
<h1>Guess a number...</h1> | ||
<h:form id="numberGuess"> | ||
<div style="color: red"> | ||
<h:messages id="messages" globalOnly="false"/> | ||
<h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess and game.guess ne 0}"/> | ||
<h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess and game.guess ne 0}"/> | ||
</div> | ||
|
||
<div> | ||
I'm thinking of a number between #{game.smallest} and #{game.biggest}. You have #{game.remainingGuesses} guesses remaining. | ||
</div> | ||
|
||
<div> | ||
Your guess: | ||
<h:inputText id="inputGuess" value="#{game.guess}" | ||
required="true" size="3" disabled="#{game.number eq game.guess}" validator="#{game.validateNumberRange}"/> | ||
<h:commandButton id="guessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/> | ||
</div> | ||
<div> | ||
<h:commandButton id="restartButton" value="Reset" action="#{game.reset}" immediate="true"/> | ||
</div> | ||
</h:form> | ||
</ui:define> | ||
</ui:composition> | ||
</html> |