viewCodes.xhtml
1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!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">
<ui:param name="thispage" value="page.gamecode.viewCodes" />
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{gameCodeView.initUserView}" />
</f:metadata>
<ui:define name="content">
<h:form>
<h:outputLabel rendered="#{gameCodeView.noGameCodes}" value="#{i18n['game.noGameCodes']}" />
<h:dataTable rendered="#{not gameCodeView.noGameCodes}" border="1" id="codes" value="#{gameCodeView.gameCodes}" var="code">
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['game.name']}" />
</f:facet>
<h:outputText value="#{code.game.name}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['game.description']}" />
</f:facet>
<h:outputText value="#{code.game.description}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['gamecode.code']}" />
</f:facet>
<h:commandButton rendered="#{not code.accessed}" value="#{i18n['gamecode.open']}" action="#{gameCodeView.openSelectedCode}" />
<h:outputText rendered="#{code.accessed}" value="#{code.code}" />
</h:column>
</h:dataTable>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>