home.xhtml revision ada1678a4262b208a7b87391f520a7767d25287c
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
bec154197d3d640b0d5b416cd5218ea58dca5d3aTinderbox User<!--
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The contents of this file are subject to the terms of either the GNU
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein General Public License Version 2 only ("GPL") or the Common Development
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and Distribution License("CDDL") (collectively, the "License"). You
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein may not use this file except in compliance with the License. You can
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein obtain a copy of the License at
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein or packager/legal/LICENSE.txt. See the License for the specific
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein language governing permissions and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User When distributing the software, include this License Header Notice in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein file and include the License file at packager/legal/LICENSE.txt.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein GPL Classpath Exception:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Oracle designates this particular file as subject to the "Classpath"
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews exception as provided by Oracle in the GPL Version 2 section of the License
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein file that accompanied this code.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Modifications:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If applicable, add the following below the License Header, with the fields
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein enclosed by brackets [] replaced by your own identifying information:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein "Portions Copyright [year] [name of copyright owner]"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Contributor(s):
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews If you wish your version of this file to be governed by only the CDDL or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein only the GPL Version 2, indicate your decision by adding "[Contributor]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein elects to include this software in this distribution under the [CDDL or GPL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Version 2] license." If you don't indicate a single choice of license, a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein recipient has the option to distribute your version of this file under
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein either the CDDL, the GPL Version 2 or to extend the choice of license to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein its licensees as provided above. However, if you add GPL Version 2 code
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and therefore, elected the GPL Version 2 license, then the option applies
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein only if the new code is made subject to such option by the copyright
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein holder.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein-->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews<html xmlns="http://www.w3.org/1999/xhtml"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein xmlns:ui="http://java.sun.com/jsf/facelets"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein xmlns:h="http://java.sun.com/jsf/html"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein xmlns:f="http://java.sun.com/jsf/core">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <ui:composition template="template.xhtml">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <ui:define name="content">
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User <h1>Guess a number...</h1>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <h:form id="NumberGuessMain">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <div style="color: red">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <h:messages id="messages" globalOnly="false"/>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User <h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess and game.guess ne 0}"/>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess and game.guess ne 0}"/>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </div>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <div>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein I'm thinking of a number between #{game.smallest} and #{game.biggest}. You have #{game.remainingGuesses} guesses.
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User </div>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <div>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User Your guess:
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}"
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User validator="#{game.validateNumberRange}">
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User </h:inputText>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User </div>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User <div>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User <h:commandButton id="RestartButton" value="Reset" action="#{game.reset}" immediate="true" />
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User </div>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </h:form>
3a32ac2a720653083c7a22cb654b86c398f6d4c8Tinderbox User </ui:define>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </ui:composition>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein</html>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein