Browse Source

use stateless jsf (#2804)

Cody Lerum 8 years ago
parent
commit
91ec8631e6
1 changed files with 18 additions and 16 deletions
  1. 18 16
      frameworks/Java/wildfly-ee7/src/main/webapp/fortunes.xhtml

+ 18 - 16
frameworks/Java/wildfly-ee7/src/main/webapp/fortunes.xhtml

@@ -1,20 +1,22 @@
 <!DOCTYPE html>
-<html>
-<head>
-<title>Fortunes</title>
-</head>
-<h:body xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html">
-	<table>
-		<tr>
-			<th>id</th>
-			<th>message</th>
-		</tr>
-		<ui:repeat var="_f" value="#{fortunes.data}">
+<html xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html">
+<f:view transient="true">
+	<h:head>
+		<title>Fortunes</title>
+	</h:head>
+	<h:body>
+		<table>
 			<tr>
-				<td><h:outputText value="#{_f.id}" /></td>
-				<td><h:outputText value="#{_f.message}" /></td>
+				<th>id</th>
+				<th>message</th>
 			</tr>
-		</ui:repeat>
-	</table>
-</h:body>
+			<ui:repeat var="_f" value="#{fortunes.data}">
+				<tr>
+					<td><h:outputText value="#{_f.id}" /></td>
+					<td><h:outputText value="#{_f.message}" /></td>
+				</tr>
+			</ui:repeat>
+		</table>
+	</h:body>
+</f:view>
 </html>