manageCodes.xhtml 1.9 KB
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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:products="http://java.sun.com/jsf/composite/tools/products" xmlns:tools="http://java.sun.com/jsf/composite/tools" xmlns:f="http://java.sun.com/jsf/core">
<h:body>
	<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
		<f:metadata>
			<f:viewParam name="userid" value="#{userView.userid}" />
			<f:event type="preRenderView" listener="#{gameCodeView.initView}" />
		</f:metadata>
		<ui:param name="thispage" value="page.game.list" />


		<ui:define name="content">
			<h:dataTable border="1" id="games" value="#{gameCodeView.games}" var="game">
				<h:column>
					<f:facet name="header">
						<h:outputText value="${i18n['game.name']}" />
					</f:facet>
					<h:outputText value="#{game.name}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="edit" />
					</f:facet>
					<h:commandButton value="muokkaa" action="#{gameCodeView.editSelected}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="GENEROI" />
					</f:facet>
					<h:commandButton value="generoi kaikille paikoille" action="#{gameCodeView.generateSelectedToAllPlaces}" />
					HOX: ei vielä valmis, älä paina, oikeasti!
					
				</h:column>
			</h:dataTable>

			<h:form>
				<h:outputLabel value="name" />
				<h:inputText value="#{gameCodeView.currentGame.name}" />
				<h:outputLabel value="description" />
				<h:inputText value="#{gameCodeView.currentGame.description}" />
				<h:outputLabel value="url" />
				<h:inputText value="#{gameCodeView.currentGame.codeUrl}" />
				<h:commandButton action="#{gameCodeView.saveCurrentGame}" value="save" />
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>