gameids.xhtml 2.57 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:f="http://java.sun.com/jsf/core"
	xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:account="http://java.sun.com/jsf/composite/cditools/account"
	xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui">
<h:body>
	<ui:composition template="#{sessionHandler.template}">
		<f:metadata>
			<f:event type="preRenderView" listener="#{userGameIDView.initView}" />
		</f:metadata>

		<ui:define name="title">
			<h1>#{i18n['user.edit.gameids']}</h1>
		</ui:define>
		<ui:define name="content">
			<h:form>
				<p:messages autoUpdate="true" redisplay="false"></p:messages>
				<h2>#{i18n['user.game.current_gameids']}</h2>
				<p:dataTable value="#{userGameIDView.eventUser.gameIDs}" var="gameid" styleClass="moya_datatable2">
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{i18n['tournament.game']}" />
						</f:facet>
						<h:outputText value="#{gameid.game.name}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{i18n['tournament.participant_gameid']}" />
						</f:facet>
						<h:outputText value="#{gameid.identifier}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{i18n['user.game.manage']}" />
						</f:facet>
						<p:commandButton value="#{i18n['user.game.remove_gameid']}" action="#{userGameIDView.removeGameID(gameid.id)}" ajax="false" onerror="location.reload(true);"/>
					</p:column>
				</p:dataTable>
				<h:panelGroup rendered="#{not empty userGameIDView.games}">
					<h2>#{i18n['user.game.add_new_gameid']}</h2>
					<h:panelGrid columns="2">
						<h:outputText value="#{i18n['tournament.game']}" />
		 				<h:selectOneMenu value="#{userGameIDView.gameToAddIdTo}" converter="#{tournamentGameConverter}">
							<f:selectItems var="game" itemLabel="#{game.name}" value="#{userGameIDView.games}" itemValue="#{game}" />
						</h:selectOneMenu>
					
		 				<h:outputText value="#{i18n['tournament.participant_gameid']}" />
		 				<p:inputText value="#{userGameIDView.identifier}" />
		 				
		 				<p:commandButton value="#{i18n['user.game.add_gameid']}" action="#{userGameIDView.addGameID}" ajax="false" onerror="location.reload(true);"/>
	 				</h:panelGrid>
 				</h:panelGroup>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>