[seam-commits] Seam SVN: r8676 - trunk/examples/numberguess/view.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Aug 13 11:08:01 EDT 2008
Author: stan.silvert at jboss.com
Date: 2008-08-13 11:08:01 -0400 (Wed, 13 Aug 2008)
New Revision: 8676
Modified:
trunk/examples/numberguess/view/cheat.jspx
trunk/examples/numberguess/view/confirm.jspx
trunk/examples/numberguess/view/giveup.jspx
trunk/examples/numberguess/view/numberGuess.jspx
trunk/examples/numberguess/view/win.jspx
Log:
JBSEAM-3099 - Port JBSEAM-3048 to trunk "Add id attribute to markup for JSF components in Seam examples"
Modified: trunk/examples/numberguess/view/cheat.jspx
===================================================================
--- trunk/examples/numberguess/view/cheat.jspx 2008-08-13 14:52:20 UTC (rev 8675)
+++ trunk/examples/numberguess/view/cheat.jspx 2008-08-13 15:08:01 UTC (rev 8676)
@@ -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: trunk/examples/numberguess/view/confirm.jspx
===================================================================
--- trunk/examples/numberguess/view/confirm.jspx 2008-08-13 14:52:20 UTC (rev 8675)
+++ trunk/examples/numberguess/view/confirm.jspx 2008-08-13 15:08:01 UTC (rev 8676)
@@ -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: trunk/examples/numberguess/view/giveup.jspx
===================================================================
--- trunk/examples/numberguess/view/giveup.jspx 2008-08-13 14:52:20 UTC (rev 8675)
+++ trunk/examples/numberguess/view/giveup.jspx 2008-08-13 15:08:01 UTC (rev 8676)
@@ -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: trunk/examples/numberguess/view/numberGuess.jspx
===================================================================
--- trunk/examples/numberguess/view/numberGuess.jspx 2008-08-13 14:52:20 UTC (rev 8675)
+++ trunk/examples/numberguess/view/numberGuess.jspx 2008-08-13 15:08:01 UTC (rev 8676)
@@ -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: trunk/examples/numberguess/view/win.jspx
===================================================================
--- trunk/examples/numberguess/view/win.jspx 2008-08-13 14:52:20 UTC (rev 8675)
+++ trunk/examples/numberguess/view/win.jspx 2008-08-13 15:08:01 UTC (rev 8676)
@@ -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>
More information about the seam-commits
mailing list