[weld-commits] Weld SVN: r5988 - examples/trunk/jsf/login/src/main/webapp.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Tue Mar 2 14:40:55 EST 2010


Author: pete.muir at jboss.org
Date: 2010-03-02 14:40:54 -0500 (Tue, 02 Mar 2010)
New Revision: 5988

Added:
   examples/trunk/jsf/login/src/main/webapp/users.xhtml
Modified:
   examples/trunk/jsf/login/src/main/webapp/home.xhtml
Log:
start to add persistence to the example

Modified: examples/trunk/jsf/login/src/main/webapp/home.xhtml
===================================================================
--- examples/trunk/jsf/login/src/main/webapp/home.xhtml	2010-03-02 19:39:11 UTC (rev 5987)
+++ examples/trunk/jsf/login/src/main/webapp/home.xhtml	2010-03-02 19:40:54 UTC (rev 5988)
@@ -12,11 +12,12 @@
           <h:outputLabel for="username">Username:</h:outputLabel> 
           <h:inputText id="username" value="#{credentials.username}"/> 
           <h:outputLabel for="password">Password:</h:outputLabel> 
-          <h:inputText id="password" value="#{credentials.password}"/> 
+          <h:inputSecret id="password" value="#{credentials.password}"/> 
         </h:panelGrid> 
         <h:commandButton id="login" value="Login" action="#{login.login}" rendered="#{!login.loggedIn}"/> 
         <h:commandButton id="logout" value="Logout" action="#{login.logout}" rendered="#{login.loggedIn}"/> 
       </h:form> 
+      <h:link outcome="/users.xhtml">View users</h:link>
     </ui:define>
   </ui:composition>
 </html>

Added: examples/trunk/jsf/login/src/main/webapp/users.xhtml
===================================================================
--- examples/trunk/jsf/login/src/main/webapp/users.xhtml	                        (rev 0)
+++ examples/trunk/jsf/login/src/main/webapp/users.xhtml	2010-03-02 19:40:54 UTC (rev 5988)
@@ -0,0 +1,33 @@
+<!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">
+
+<ui:composition template="template.xhtml">
+	<ui:define name="content">
+		<h:messages />
+		<h1>Users</h1>
+		<h:dataTable value="#{users}" var="u">
+			<h:column>
+				<f:facet name="header">
+               Username
+            </f:facet>
+				<h:outputText value="#{u.username}" />
+			</h:column>
+			<h:column>
+				<f:facet name="header">
+               Name
+            </f:facet>
+				<h:outputText value="#{u.name}" />
+			</h:column>
+			<h:column>
+            <f:facet name="header">
+               Password
+            </f:facet>
+            <h:outputText value="#{u.password}" />
+         </h:column>
+		</h:dataTable>
+	</ui:define>
+</ui:composition>
+</html>


Property changes on: examples/trunk/jsf/login/src/main/webapp/users.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain



More information about the weld-commits mailing list