helloPage.xhtml 1.35 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">
		<p>
			Hello Message: <i>${helloWorld.sayHello()}</i>
		</p>	
		
		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}"></h:outputText>
				</h:column>
			</h:dataTable>
			

		</ui:define>
		<ui:define name="footer">footer</ui:define>
	</ui:composition>
</h:body>
    </html>