Skip to content

Commit

Permalink
WELD-334
Browse files Browse the repository at this point in the history
  • Loading branch information
kpiwko committed Dec 14, 2009
1 parent f6a20af commit 46563f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -16,6 +16,11 @@
@SessionScoped
public class Game implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 991300443278089016L;

private int number;

private int guess;
Expand Down Expand Up @@ -92,7 +97,7 @@ public void reset()

public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
{
if (remainingGuesses <= 0)
if (remainingGuesses <= 1)
{
FacesMessage message = new FacesMessage("No guesses left!");
context.addMessage(toValidate.getClientId(context), message);
Expand Down
2 changes: 1 addition & 1 deletion jsf/numberguess/src/main/webapp/home.xhtml
Expand Up @@ -16,7 +16,7 @@
</div>

<div>
I'm thinking of a number between #{game.smallest} and #{game.biggest}. You have #{game.remainingGuesses} guesses remaining.
I'm thinking of a number between <span id="numberGuess:smallest">#{game.smallest}</span> and <span id="numberGuess:biggest">#{game.biggest}</span>. You have #{game.remainingGuesses} guesses remaining.
</div>

<div>
Expand Down

0 comments on commit 46563f3

Please sign in to comment.