helloWorld.xhtml 1.54 KB
<!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>