helloWorld.xhtml
1.54 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
47
48
49
50
51
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
<h:head>
<title></title>
</h:head>
<h:body>
<ui:composition template="/layout/default-template.xhtml">
<ui:define name="title">HelloWorld</ui:define>
<ui:define name="header">Header</ui:define>
<ui:define name="content">
Hello Message: <i>${helloWorld.hello}</i>
<h:form>
<h:inputText value="#{helloWorld.name}" />
<h:commandButton action="helloPage" value="Say hello" />
</h:form>
<h:form>
So far said hello to the following people
<h:dataTable id="dt1" value="#{helloWorld.helloedPeople}" var="item">
<h:column>
<f:facet name="header">
<h:outputText value="id" />
</f:facet>
<h:outputText value="#{item.id}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="name" />
</f:facet>
<h:commandLink action="#{helloWorld.getDetail}" value="#{item.name}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="saved" />
</f:facet>
<h:outputText value="#{item.saved}">
<f:convertDateTime pattern="dd.MM.yyyy hh:mm"/>
</h:outputText>
</h:column>
</h:dataTable>
</h:form>
</ui:define>
<ui:define name="footer">footer</ui:define>
</ui:composition>
</h:body>
</html>