Author: stan.silvert(a)jboss.com
Date: 2008-06-04 21:55:47 -0400 (Wed, 04 Jun 2008)
New Revision: 8330
Modified:
branches/Seam_2_0/examples/numberguess/view/cheat.jspx
branches/Seam_2_0/examples/numberguess/view/confirm.jspx
branches/Seam_2_0/examples/numberguess/view/giveup.jspx
branches/Seam_2_0/examples/numberguess/view/numberGuess.jspx
branches/Seam_2_0/examples/numberguess/view/win.jspx
Log:
JBSEAM-3048
Modified: branches/Seam_2_0/examples/numberguess/view/cheat.jspx
===================================================================
--- branches/Seam_2_0/examples/numberguess/view/cheat.jspx 2008-06-04 22:53:43 UTC (rev
8329)
+++ branches/Seam_2_0/examples/numberguess/view/cheat.jspx 2008-06-05 01:55:47 UTC (rev
8330)
@@ -17,9 +17,9 @@
<body>
<h1>You cheater!</h1>
<f:view>
- <h:form styleClass="niceform">
- (The answer is <h:outputText
value="#{numberGuess.randomNumber}"/>.)
- <h:commandButton value="Done"/>
+ <h:form id="cheat" styleClass="niceform">
+ (The answer is <h:outputText id="RandomNumber"
value="#{numberGuess.randomNumber}"/>.)
+ <h:commandButton id="DoneButton" value="Done"/>
</h:form>
</f:view>
</body>
Modified: branches/Seam_2_0/examples/numberguess/view/confirm.jspx
===================================================================
--- branches/Seam_2_0/examples/numberguess/view/confirm.jspx 2008-06-04 22:53:43 UTC (rev
8329)
+++ branches/Seam_2_0/examples/numberguess/view/confirm.jspx 2008-06-05 01:55:47 UTC (rev
8330)
@@ -17,10 +17,10 @@
<body>
<h1>Do you really want to cheat?</h1>
<f:view>
- <h:form styleClass="niceform">
+ <h:form id="confirm" styleClass="niceform">
I'll be really disappointed if you do this...
- <h:commandButton value="Yes" action="yes"/>
- <h:commandButton value="No" action="no"/>
+ <h:commandButton id="YesButton" value="Yes"
action="yes"/>
+ <h:commandButton id="NoButton" value="No"
action="no"/>
</h:form>
</f:view>
</body>
Modified: branches/Seam_2_0/examples/numberguess/view/giveup.jspx
===================================================================
--- branches/Seam_2_0/examples/numberguess/view/giveup.jspx 2008-06-04 22:53:43 UTC (rev
8329)
+++ branches/Seam_2_0/examples/numberguess/view/giveup.jspx 2008-06-05 01:55:47 UTC (rev
8330)
@@ -17,10 +17,10 @@
<body>
<h1>Do you really want to give up now?</h1>
<f:view>
- <h:form styleClass="niceform">
- You still have <h:outputText
value="#{numberGuess.remainingGuesses}"/> guesses remaining.
- <h:commandButton value="Yes" action="yes"/>
- <h:commandButton value="No" action="no"/>
+ <h:form id="giveup" styleClass="niceform">
+ You still have <h:outputText id="RemainingGuesses"
value="#{numberGuess.remainingGuesses}"/> guesses remaining.
+ <h:commandButton id="YesButton" value="Yes"
action="yes"/>
+ <h:commandButton id="NoButton" value="No"
action="no"/>
</h:form>
</f:view>
</body>
Modified: branches/Seam_2_0/examples/numberguess/view/numberGuess.jspx
===================================================================
--- branches/Seam_2_0/examples/numberguess/view/numberGuess.jspx 2008-06-04 22:53:43 UTC
(rev 8329)
+++ branches/Seam_2_0/examples/numberguess/view/numberGuess.jspx 2008-06-05 01:55:47 UTC
(rev 8330)
@@ -18,44 +18,46 @@
<body>
<h1>Guess a number...</h1>
<f:view>
- <h:form styleClass="niceform">
+ <h:form id="NumberGuessMain" styleClass="niceform">
<div>
- <h:messages globalOnly="true"/>
- <h:outputText value="Higher!"
+ <h:messages id="messages" globalOnly="true"/>
+ <h:outputText id="Higher"
+ value="Higher!"
rendered="#{numberGuess.randomNumber gt
numberGuess.currentGuess}"/>
- <h:outputText value="Lower!"
+ <h:outputText id="Lower"
+ value="Lower!"
rendered="#{numberGuess.randomNumber lt
numberGuess.currentGuess}"/>
</div>
<div>
- 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.
+ I'm thinking of a number between <h:outputText id="Smalles"
value="#{numberGuess.smallest}"/> and
+ <h:outputText id="Biggest"
value="#{numberGuess.biggest}"/>. You have
+ <h:outputText id="RemainingGuesses"
value="#{numberGuess.remainingGuesses}"/> guesses.
</div>
<div>
Your guess:
- <h:inputText value="#{numberGuess.currentGuess}"
id="inputGuess" required="true" size="3"
+ <h:inputText id="inputGuess"
value="#{numberGuess.currentGuess}" required="true" size="3"
rendered="#{(numberGuess.biggest-numberGuess.smallest) gt
20}">
<f:validateLongRange maximum="#{numberGuess.biggest}"
minimum="#{numberGuess.smallest}"/>
</h:inputText>
- <h:selectOneMenu value="#{numberGuess.currentGuess}"
id="selectGuessMenu" required="true"
+ <h:selectOneMenu id="selectGuessMenu"
value="#{numberGuess.currentGuess}" required="true"
rendered="#{(numberGuess.biggest-numberGuess.smallest) le 20
and (numberGuess.biggest-numberGuess.smallest) gt 4}">
- <s:selectItems value="#{numberGuess.possibilities}"
var="i" label="#{i}"/>
+ <s:selectItems id="PossibilitiesMenuItems"
value="#{numberGuess.possibilities}" var="i"
label="#{i}"/>
</h:selectOneMenu>
- <h:selectOneRadio value="#{numberGuess.currentGuess}"
id="selectGuessRadio" required="true"
+ <h:selectOneRadio id="selectGuessRadio"
value="#{numberGuess.currentGuess}" required="true"
rendered="#{(numberGuess.biggest-numberGuess.smallest) le
4}">
- <s:selectItems value="#{numberGuess.possibilities}"
var="i" label="#{i}"/>
+ <s:selectItems id="PossibilitiesRadioItems"
value="#{numberGuess.possibilities}" var="i"
label="#{i}"/>
</h:selectOneRadio>
- <h:commandButton value="Guess" action="guess"/>
- <s:button value="Cheat" action="cheat"/>
- <s:button value="Give up" action="giveup"/>
+ <h:commandButton id="GuessButton" value="Guess"
action="guess"/>
+ <s:button id="CheatButton" value="Cheat"
action="cheat"/>
+ <s:button id="GiveUpButton" value="Give up"
action="giveup"/>
</div>
<div>
- <h:message for="inputGuess" style="color: red"/>
+ <h:message id="message" for="inputGuess"
style="color: red"/>
</div>
</h:form>
Modified: branches/Seam_2_0/examples/numberguess/view/win.jspx
===================================================================
--- branches/Seam_2_0/examples/numberguess/view/win.jspx 2008-06-04 22:53:43 UTC (rev
8329)
+++ branches/Seam_2_0/examples/numberguess/view/win.jspx 2008-06-05 01:55:47 UTC (rev
8330)
@@ -16,9 +16,9 @@
<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.
- <h:outputText value="But you cheated, so it doesn't count!"
rendered="#{numberGuess.cheat}"/>
+ Yes, the answer was <h:outputText id="CurrentGuess"
value="#{numberGuess.currentGuess}" />.
+ It took you <h:outputText id="GuessCount"
value="#{numberGuess.guessCount}" /> guesses.
+ <h:outputText id="CheatedMessage" 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>
Show replies by date