[seam-commits] Seam SVN: r13194 - in examples/trunk/booking-simplified/src/main: webapp/WEB-INF and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jun 16 17:06:01 EDT 2010


Author: lincolnthree
Date: 2010-06-16 17:06:00 -0400 (Wed, 16 Jun 2010)
New Revision: 13194

Modified:
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordConfirmValidator.java
   examples/trunk/booking-simplified/src/main/webapp/WEB-INF/layout/template.xhtml
   examples/trunk/booking-simplified/src/main/webapp/WEB-INF/pretty-config.xml
Log:
Stateless logout and removed CID from permalinks via pretty-link to get around Weld bug

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordConfirmValidator.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordConfirmValidator.java	2010-06-16 20:00:40 UTC (rev 13193)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordConfirmValidator.java	2010-06-16 21:06:00 UTC (rev 13194)
@@ -57,7 +57,7 @@
 
    public void validate(final FacesContext context, final UIComponent comp, final Object components) throws ValidatorException
    {
-      if ((currentUser.getPassword() != null) && currentUser.getPassword().equals(oldPassword))
+      if ((currentUser.getPassword() != null) && !currentUser.getPassword().equals(oldPassword))
       {
          throw new ValidatorException(new FacesMessage("Your original password was incorrect."));
       }

Modified: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/layout/template.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/layout/template.xhtml	2010-06-16 20:00:40 UTC (rev 13193)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/layout/template.xhtml	2010-06-16 21:06:00 UTC (rev 13194)
@@ -3,6 +3,7 @@
 <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:pretty="http://ocpsoft.com/prettyfaces"
    xmlns:f="http://java.sun.com/jsf/core"><f:view>
    <ui:insert name="metadata"/>
    <h:head>
@@ -20,18 +21,18 @@
                <div id="status">
                   <h:outputText value="(#{currentUser.name})" rendered="#{identity.loggedIn}" styleClass="user"/>
                   #{' '}
-                  <h:link id="home" outcome="/home.xhtml" value="Home"/>
+                  <pretty:link mappingId="home">Home</pretty:link>
                   #{' | '}
                   <h:link id="search" outcome="/search.xhtml" value="Find a Hotel"/>
                   <h:panelGroup rendered="#{not identity.loggedIn}">
                      #{' | '}
-                     <h:link id="login" outcome="home" value="Login"/>
+	                  <pretty:link mappingId="home">Login</pretty:link>
                   </h:panelGroup>
                   <h:panelGroup rendered="#{identity.loggedIn}">
                      #{' | '}
-                     <h:link id="settings" outcome="/password.xhtml" value="Account"/>
+                     <pretty:link mappingId="account">Account</pretty:link>
                      #{' | '}
-                     <h:commandLink id="logout" action="#{identity.logout}" value="Logout"/>
+                     <pretty:link mappingId="logout">Logout</pretty:link>
                   </h:panelGroup>
                </div>
             </h:form>

Modified: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/pretty-config.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/pretty-config.xml	2010-06-16 20:00:40 UTC (rev 13193)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/pretty-config.xml	2010-06-16 21:06:00 UTC (rev 13194)
@@ -4,11 +4,17 @@
                xsi:schemaLocation="http://ocpsoft.com/prettyfaces/2.0.4
                                    		http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-2.0.4.xsd">
 
-	<url-mapping>
+	<url-mapping id="home">
 		<pattern value="/"></pattern>
 		<view-id>/home.seam</view-id>
 	</url-mapping>
 
+	<url-mapping id="logout">
+		<pattern value="/logout"></pattern>
+		<view-id>/home.seam</view-id>
+		<action>#{identity.logout}</action>
+	</url-mapping>
+	
 	<url-mapping>
 		<pattern value="/search"></pattern>
 		<view-id>/search.seam</view-id>
@@ -29,13 +35,13 @@
 		<view-id>/confirm.seam</view-id>
 	</url-mapping>
 
-	<url-mapping>
+	<url-mapping id="register">
 		<pattern value="/register"></pattern>
 		<view-id>/register.seam</view-id>
 	</url-mapping>
 
-	<url-mapping>
-		<pattern value="/settings"></pattern>
+	<url-mapping id="account">
+		<pattern value="/account"></pattern>
 		<view-id>/password.seam</view-id>
 	</url-mapping>
 



More information about the seam-commits mailing list