[seam-commits] Seam SVN: r13210 - in examples/trunk/booking-simplified: src/main/java/org/jboss/seam/examples/booking and 14 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jun 16 21:01:37 EDT 2010


Author: dan.j.allen
Date: 2010-06-16 21:01:35 -0400 (Wed, 16 Jun 2010)
New Revision: 13210

Added:
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/Bundles.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ReservationDateRangeValidator.java
Removed:
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/BookingFormControls.java
Modified:
   examples/trunk/booking-simplified/pom.xml
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolder.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolderBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Authenticated.java
   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/PasswordManager.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManagerBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Registrar.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/RegistrarBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgent.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingEvent.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistory.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetup.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetupBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/RegistrationFormControls.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearch.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearchBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/SearchCriteria.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking_.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/CreditCardType.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel_.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User_.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CalendarReferenceProducer.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardExpiryYears.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardReferenceProducer.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/Month.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/AuthenticatorBean.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Credentials.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Identity.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/MockCredentials.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/faces/component/UIInputContainer.java
   examples/trunk/booking-simplified/src/main/resources/messages.properties
   examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml
   examples/trunk/booking-simplified/src/main/webapp/account.xhtml
   examples/trunk/booking-simplified/src/main/webapp/book.xhtml
   examples/trunk/booking-simplified/src/main/webapp/confirm.xhtml
   examples/trunk/booking-simplified/src/main/webapp/home.xhtml
   examples/trunk/booking-simplified/src/main/webapp/hotel.xhtml
   examples/trunk/booking-simplified/src/main/webapp/password.xhtml
   examples/trunk/booking-simplified/src/main/webapp/search.xhtml
   examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/booking/BookingAgentTest.java
   examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/support/NoOpLogger.java
Log:
update license header
xval for booking
use constant for messages bundle name
cleanups


Modified: examples/trunk/booking-simplified/pom.xml
===================================================================
--- examples/trunk/booking-simplified/pom.xml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/pom.xml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -135,6 +135,13 @@
          <scope>test</scope>
       </dependency>
 
+      <dependency>
+         <groupId>org.codehaus.groovy.maven.runtime</groupId>
+         <artifactId>gmaven-runtime-1.6</artifactId>
+         <version>1.0</version>
+         <scope>test</scope>
+      </dependency>
+
    </dependencies>
 
    <build>
@@ -154,6 +161,19 @@
          </plugin>
 
          <plugin>
+            <groupId>org.codehaus.groovy.maven</groupId>
+            <artifactId>gmaven-plugin</artifactId>
+            <version>1.0</version>
+            <executions>
+               <execution>
+                  <goals>
+                     <goal>testCompile</goal>
+                  </goals>
+               </execution>
+            </executions>
+         </plugin>
+
+         <plugin>
             <artifactId>maven-eclipse-plugin</artifactId>
             <configuration>
                <additionalBuildcommands>

Added: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/Bundles.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/Bundles.java	                        (rev 0)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/Bundles.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -0,0 +1,30 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.examples.booking;
+
+/**
+ * @author Dan Allen
+ */
+public interface Bundles
+{
+   static final String MESSAGES = "messages";
+}

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolder.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolder.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolder.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.account;
 
 import javax.ejb.Local;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolderBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolderBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/AccountHolderBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.account;
 
 import javax.ejb.Stateful;
@@ -4,11 +25,9 @@
 import javax.enterprise.context.SessionScoped;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
 import javax.inject.Named;
 
 import org.jboss.seam.examples.booking.model.User;
-import org.slf4j.Logger;
 
 /**
  * @author Dan Allen

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Authenticated.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Authenticated.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Authenticated.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.account;
 
 import static java.lang.annotation.ElementType.FIELD;

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 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordConfirmValidator.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,4 +1,4 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
@@ -28,6 +28,7 @@
 import javax.faces.validator.Validator;
 import javax.faces.validator.ValidatorException;
 import javax.inject.Inject;
+import org.jboss.seam.examples.booking.Bundles;
 
 import org.jboss.seam.examples.booking.model.User;
 import org.jboss.seam.faces.validation.InputField;
@@ -36,7 +37,6 @@
 
 /**
  * @author <a href="mailto:lincolnbaxter at gmail.com">Lincoln Baxter, III</a>
- * 
  */
 @FacesValidator(value = "passwordConfirmValidator")
 public class PasswordConfirmValidator implements Validator
@@ -68,12 +68,15 @@
           * This is an ugly way to put i18n in FacesMessages:
           * https://jira.jboss.org/browse/SEAMFACES-24
           */
-         throw new ValidatorException(new FacesMessage(msg.info(new BundleKey("messages", "account.passwordNotConfirmed")).build().getText()));
+         throw new ValidatorException(
+               new FacesMessage(msg.info(
+                     new BundleKey(Bundles.MESSAGES, "account.passwordNotConfirmed"))
+                     .build().getText()));
       }
 
       if ((newPassword != null) && !newPassword.equals(confirmNewPassword))
       {
-         throw new ValidatorException(new FacesMessage(msg.info(new BundleKey("messages", "account.passwordsDoNotMatch")).build().getText()));
+         throw new ValidatorException(new FacesMessage(msg.info(new BundleKey(Bundles.MESSAGES, "account.passwordsDoNotMatch")).build().getText()));
       }
    }
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManager.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManager.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManager.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.account;
 
 import javax.ejb.Local;
@@ -5,7 +26,6 @@
 import javax.validation.constraints.Size;
 
 /**
- *
  * @author Dan Allen
  */
 @Local

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManagerBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManagerBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManagerBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.account;
 
 import javax.ejb.Stateful;
@@ -6,6 +27,7 @@
 import javax.inject.Named;
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
+import org.jboss.seam.examples.booking.Bundles;
 
 import org.jboss.seam.examples.booking.model.User;
 import org.jboss.seam.international.status.Messages;
@@ -36,7 +58,7 @@
    public void changePassword()
    {
       em.merge(user);
-      messages.info(new BundleKey("messages", "account.passwordChanged")).textDefault("Password successfully updated.");
+      messages.info(new BundleKey(Bundles.MESSAGES, "account.passwordChanged")).textDefault("Password successfully updated.");
       changed = true;
    }
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Registrar.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Registrar.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Registrar.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.account;
 
 import javax.ejb.Local;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/RegistrarBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/RegistrarBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/RegistrarBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.account;
 
 import javax.ejb.Stateful;
@@ -7,6 +28,7 @@
 import javax.inject.Named;
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
+import org.jboss.seam.examples.booking.Bundles;
 
 import org.jboss.seam.examples.booking.controls.RegistrationFormControls;
 import org.jboss.seam.examples.booking.model.User;
@@ -44,7 +66,7 @@
       {
          registered = true;
          em.persist(newUser);
-         messages.info(new BundleKey("messages", "registration.registered")).textDefault("You have been successfully registered as the user {0}!").textParams(newUser.getUsername());
+         messages.info(new BundleKey(Bundles.MESSAGES, "registration.registered")).textDefault("You have been successfully registered as the user {0}!").textParams(newUser.getUsername());
       }
       else
       {
@@ -63,7 +85,7 @@
    {
       if (validationFailed || registrationInvalid)
       {
-         messages.warn(new BundleKey("messages", "registration.invalid")).textDefault("Invalid registration. Please correct the errors and try again.");
+         messages.warn(new BundleKey(Bundles.MESSAGES, "registration.invalid")).textDefault("Invalid registration. Please correct the errors and try again.");
       }
    }
 
@@ -97,7 +119,7 @@
    {
       if (!newUser.getPassword().equals(confirmPassword))
       {
-         messages.warn(new BundleKey("messages", "account.passwordsDoNotMatch")).textDefault("Passwords do not match. Please re-type your password.").targets(formControls.getConfirmPasswordControlId());
+         messages.warn(new BundleKey(Bundles.MESSAGES, "account.passwordsDoNotMatch")).textDefault("Passwords do not match. Please re-type your password.").targets(formControls.getConfirmPasswordControlId());
          confirmPassword = null;
          return false;
       }


Property changes on: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking
___________________________________________________________________
Name: svn:ignore
   + .BookingAgentBean.java.swp


Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgent.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgent.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgent.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
 /* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.booking;
 
@@ -38,7 +36,7 @@
 
    void bookHotel();
 
-   void validateBooking();
+   void validate();
 
    void cancel();
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.booking;
 
@@ -38,7 +36,6 @@
 import javax.persistence.PersistenceContext;
 
 import org.jboss.seam.examples.booking.account.Authenticated;
-import org.jboss.seam.examples.booking.controls.BookingFormControls;
 import org.jboss.seam.examples.booking.model.Booking;
 import org.jboss.seam.examples.booking.model.Hotel;
 import org.jboss.seam.examples.booking.model.User;
@@ -50,6 +47,7 @@
 import org.slf4j.Logger;
 
 import com.ocpsoft.pretty.time.PrettyTime;
+import org.jboss.seam.examples.booking.Bundles;
 
 @Named("bookingAgent")
 @Stateful
@@ -69,9 +67,6 @@
    private Messages messages;
 
    @Inject
-   private BookingFormControls formControls;
-
-   @Inject
    @Authenticated
    private User user;
 
@@ -88,8 +83,7 @@
    @Begin
    public void selectHotel(final Long id)
    {
-      // NOTE get a fresh reference that's managed by the extended persistence
-      // context
+      // NOTE get a fresh reference that's managed by the extended persistence context
       hotelSelection = em.find(Hotel.class, id);
       if (hotelSelection != null)
       {
@@ -102,31 +96,18 @@
       booking = new Booking(hotelSelection, user);
       // QUESTION push logic into Booking?
       Calendar calendar = Calendar.getInstance();
+      calendar.add(Calendar.DAY_OF_MONTH, 1);
       booking.setCheckinDate(calendar.getTime());
       calendar.add(Calendar.DAY_OF_MONTH, 1);
       booking.setCheckoutDate(calendar.getTime());
       hotelSelection = null;
-      messages.info(new BundleKey("messages", "booking.initiated")).textDefault("You've initiated a booking at {0}.").textParams(booking.getHotel().getName());
+      messages.info(new BundleKey(Bundles.MESSAGES, "booking.initiated")).textDefault("You've initiated a booking at the {0}.").textParams(booking.getHotel().getName());
    }
 
-   public void validateBooking()
+   public void validate()
    {
-      Calendar calendar = Calendar.getInstance();
-      calendar.add(Calendar.DAY_OF_MONTH, -1);
-      if (booking.getCheckinDate().before(calendar.getTime()))
-      {
-         messages.info(new BundleKey("messages", "booking.checkInNotFutureDate")).textDefault("Check in date must be a future date").targets(formControls.getCheckinDateControlId());
-         bookingValid = false;
-      }
-      else if (!booking.getCheckinDate().before(booking.getCheckoutDate()))
-      {
-         messages.info(new BundleKey("messages", "booking.checkOutBeforeCheckIn")).textDefault("Check out date must be after check in date").targets(formControls.getCheckoutDateControlId());
-         bookingValid = false;
-      }
-      else
-      {
-         bookingValid = true;
-      }
+      // if we got here, all validations passed
+      bookingValid = true;
    }
 
    @End
@@ -135,8 +116,11 @@
       em.persist(booking);
       // FIXME can't inject event object into bean with passivating scope
       manager.fireEvent(new BookingEvent(booking), ConfirmedLiteral.INSTANCE);
-      log.info(msg.info("New booking at the {0} confirmed for {1}").textParams(booking.getHotel().getName(), booking.getUser().getName()).build().getText());
-      messages.info(new BundleKey("messages", "booking.confirmed")).textDefault("Booking confirmed.").textParams(new PrettyTime().format(booking.getCheckinDate()));
+      log.info(msg.info("New booking at the {0} confirmed for {1}")
+            .textParams(booking.getHotel().getName(), booking.getUser().getName()).build().getText());
+      messages.info(new BundleKey(Bundles.MESSAGES, "booking.confirmed"))
+            .textDefault("You're booked to stay at the {0} {1}.")
+            .textParams(booking.getHotel().getName(), new PrettyTime().format(booking.getCheckinDate()));
    }
 
    @End

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingEvent.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingEvent.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingEvent.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.booking;
 
 import org.jboss.seam.examples.booking.model.Booking;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistory.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistory.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistory.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.booking;
 
 import java.util.List;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.booking;
 
@@ -39,6 +37,7 @@
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.JoinType;
 import javax.persistence.criteria.Root;
+import org.jboss.seam.examples.booking.Bundles;
 
 import org.jboss.seam.examples.booking.account.Authenticated;
 import org.jboss.seam.examples.booking.model.Booking;
@@ -104,11 +103,11 @@
       if (booking != null)
       {
          em.remove(booking);
-         messages.info(new BundleKey("messages", "booking.canceled")).textDefault("The booking at the {0} on {1,date} has been canceled.").textParams(selectedBooking.getHotel().getName(), selectedBooking.getCheckinDate());
+         messages.info(new BundleKey(Bundles.MESSAGES, "booking.canceled")).textDefault("The booking at the {0} on {1,date} has been canceled.").textParams(selectedBooking.getHotel().getName(), selectedBooking.getCheckinDate());
       }
       else
       {
-         messages.info(new BundleKey("messages", "booking.doesNotExist")).textDefault("Our records indicate that the booking you selected has already been canceled.");
+         messages.info(new BundleKey(Bundles.MESSAGES, "booking.doesNotExist")).textDefault("Our records indicate that the booking you selected has already been canceled.");
       }
 
       bookingsForUser.remove(selectedBooking);

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.booking;
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.booking;
 

Added: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ReservationDateRangeValidator.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ReservationDateRangeValidator.java	                        (rev 0)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ReservationDateRangeValidator.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -0,0 +1,82 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.examples.booking.booking;
+
+import java.util.Calendar;
+import java.util.Date;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.FacesValidator;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+import javax.inject.Inject;
+import org.jboss.seam.examples.booking.Bundles;
+import org.jboss.seam.faces.validation.InputField;
+import org.jboss.seam.international.status.MessageFactory;
+import org.jboss.seam.international.status.builder.BundleKey;
+
+/**
+ * A cross-field validator that validates the begin date
+ * is in the future and before the end date.
+ *
+ * @author Dan Allen
+ */
+ at FacesValidator("reservationDateRangeValidator")
+public class ReservationDateRangeValidator implements Validator {
+   @Inject
+   @InputField
+   private Date beginDate;
+
+   @Inject
+   @InputField
+   private Date endDate;
+
+   @Inject
+   private MessageFactory msg;
+
+   @Override
+   public void validate(FacesContext ctx, UIComponent c, Object value) throws ValidatorException
+   {
+      Calendar calendar = Calendar.getInstance();
+      calendar.add(Calendar.DAY_OF_MONTH, -1);
+      if (beginDate.before(calendar.getTime()))
+      {
+         String message = msg.info(new BundleKey(Bundles.MESSAGES, "booking.checkInNotFutureDate"))
+               .textDefault("Check-in date must be in the future")
+               // FIXME this information should come through via injection
+               .targets("checkInDate:input")
+               .build().getText();
+         throw new ValidatorException(new FacesMessage(message));
+      }
+      else if (!beginDate.before(endDate))
+      {
+         String message = msg.info(new BundleKey(Bundles.MESSAGES, "booking.checkOutBeforeCheckIn"))
+               .textDefault("Check-out date must be after check-in date")
+               // FIXME this information should come through via injection
+               .targets("checkOutDate:input")
+               .build().getText();
+         throw new ValidatorException(new FacesMessage(message));
+      }
+   }
+
+}

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetup.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetup.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetup.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,4 +1,4 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
@@ -26,7 +26,6 @@
 
 /**
  * @author <a href="mailto:lincolnbaxter at gmail.com">Lincoln Baxter, III</a>
- * 
  */
 @Local
 public interface ApplicationSetup

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetupBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetupBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/bootstrap/ApplicationSetupBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.bootstrap;
 
 import java.util.ArrayList;

Deleted: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/BookingFormControls.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/BookingFormControls.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/BookingFormControls.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,52 +0,0 @@
-package org.jboss.seam.examples.booking.controls;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Named;
-import javax.faces.component.UIComponent;
-
-/**
- * A UI binding bean that can provide access to the local id and client id
- * of selected input components in the booking form.
- *
- * @author Dan Allen
- */
- at Named
- at RequestScoped
-public class BookingFormControls implements Serializable
-{
-   private UIComponent checkinDate;
-
-   private UIComponent checkoutDate;
-
-   public UIComponent getCheckinDate()
-   {
-      return checkinDate;
-   }
-
-   public String getCheckinDateControlId()
-   {
-      return checkinDate.getClientId();
-   }
-
-   public void setCheckinDate(UIComponent checkinDate)
-   {
-      this.checkinDate = checkinDate;
-   }
-
-   public UIComponent getCheckoutDate()
-   {
-      return checkoutDate;
-   }
-
-   public void setCheckoutDate(UIComponent checkoutDate)
-   {
-      this.checkoutDate = checkoutDate;
-   }
-
-   public String getCheckoutDateControlId()
-   {
-      return checkoutDate.getClientId();
-   }
-}

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/RegistrationFormControls.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/RegistrationFormControls.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/controls/RegistrationFormControls.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.controls;
 
 import java.io.Serializable;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearch.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearch.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearch.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
 /* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.inventory;
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearchBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearchBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/HotelSearchBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.inventory;
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/SearchCriteria.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/SearchCriteria.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/inventory/SearchCriteria.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.inventory;
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
 /* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.model;
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking_.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking_.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Booking_.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.model;
 
 import java.util.Date;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/CreditCardType.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/CreditCardType.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/CreditCardType.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.model;
 
 public enum CreditCardType
@@ -6,4 +27,4 @@
    MasterCard,
    AMEX,
    Discover
-}
\ No newline at end of file
+}

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
 /* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.model;
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel_.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel_.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/Hotel_.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.model;
 
 import java.math.BigDecimal;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,6 +1,6 @@
 /* 
  * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
@@ -18,8 +18,6 @@
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * $Id$
  */
 package org.jboss.seam.examples.booking.model;
 

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User_.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User_.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/model/User_.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.model;
 
 import javax.persistence.metamodel.SingularAttribute;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CalendarReferenceProducer.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CalendarReferenceProducer.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CalendarReferenceProducer.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.reference;
 
 import java.text.DateFormat;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardExpiryYears.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardExpiryYears.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardExpiryYears.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.reference;
 
 import static java.lang.annotation.ElementType.FIELD;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardReferenceProducer.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardReferenceProducer.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/CreditCardReferenceProducer.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.reference;
 
 import java.util.ArrayList;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/Month.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/Month.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/reference/Month.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.reference;
 
 /**

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.security;
 
 import javax.ejb.Local;

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/AuthenticatorBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/AuthenticatorBean.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/AuthenticatorBean.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.security;
 
 import javax.ejb.Stateless;
@@ -5,6 +26,7 @@
 import javax.inject.Inject;
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
+import org.jboss.seam.examples.booking.Bundles;
 
 import org.jboss.seam.examples.booking.account.Authenticated;
 import org.jboss.seam.examples.booking.model.User;
@@ -42,7 +64,7 @@
       log.info("Logging in " + credentials.getUsername());
       if ((credentials.getUsername() == null) || (credentials.getPassword() == null))
       {
-         messages.info(new BundleKey("messages", "identity.loginFailed"));
+         messages.info(new BundleKey(Bundles.MESSAGES, "identity.loginFailed"));
          return false;
       }
 
@@ -50,12 +72,12 @@
       if ((user != null) && user.getPassword().equals(credentials.getPassword()))
       {
          loginEventSrc.fire(user);
-         messages.info(new BundleKey("messages", "identity.loggedIn"), user.getName());
+         messages.info(new BundleKey(Bundles.MESSAGES, "identity.loggedIn"), user.getName());
          return true;
       }
       else
       {
-         messages.info(new BundleKey("messages", "identity.loginFailed"));
+         messages.info(new BundleKey(Bundles.MESSAGES, "identity.loginFailed"));
          return false;
       }
    }

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Credentials.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Credentials.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Credentials.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,3 +1,24 @@
+/* 
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.seam.examples.booking.security;
 
 public interface Credentials {

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Identity.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Identity.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Identity.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,4 +1,4 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/MockCredentials.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/MockCredentials.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/MockCredentials.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,4 +1,4 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/faces/component/UIInputContainer.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/faces/component/UIInputContainer.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/faces/component/UIInputContainer.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,4 +1,4 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a

Modified: examples/trunk/booking-simplified/src/main/resources/messages.properties
===================================================================
--- examples/trunk/booking-simplified/src/main/resources/messages.properties	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/resources/messages.properties	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,8 +1,8 @@
-booking.initiated=You've initiated a booking at {0}.
-booking.checkInNotFutureDate=Check in date must be a future date.
-booking.checkOutBeforeCheckIn=Check out date must be after check in date.
-booking.confirmed=You're booked! Check in is {0}.
-booking.canceled=The booking at the {0} on {1,date} has been canceled.
+booking.initiated=You've initiated a booking at the {0}.
+booking.checkInNotFutureDate=Check-in date must be a future date.
+booking.checkOutBeforeCheckIn=Check-out date must be after check in date.
+booking.confirmed=You're booked to stay at the {0} {1}.
+booking.canceled=Your booking at the {0} on {1,date} has been canceled.
 booking.doesNotExist=Our records indicate that the booking you selected has already been canceled.
 account.passwordChanged=Password successfully updated.
 account.passwordNotConfirmed=Your current password was not valid. Please try again.
@@ -10,6 +10,6 @@
 account.usernameTaken=The username '{0}' is already taken. Please choose another username.
 registration.registered=You have been successfully registered as the user {0}!
 registration.invalid=Invalid registration. Please correct the errors and try again.
-identity.loggedOut=You have successfully logged out.
-identity.loggedIn=You've logged in as {0}.
+identity.loggedOut=You have successfully ended your session.
+identity.loggedIn=You're signed in as {0}.
 identity.loginFailed=Invalid username or password.

Modified: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -79,7 +79,7 @@
       <from-view-id>/book.xhtml</from-view-id>
 
       <navigation-case>
-         <from-action>#{bookingAgent.validateBooking}</from-action>
+         <from-action>#{bookingAgent.validate}</from-action>
          <if>#{bookingAgent.bookingValid}</if>
          <to-view-id>/confirm.xhtml</to-view-id>
          <redirect/>

Modified: examples/trunk/booking-simplified/src/main/webapp/account.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/account.xhtml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/account.xhtml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -29,6 +29,7 @@
    
    <ui:define name="sidebar">          
 
+      <!--
       <h1>Producing variables</h1>
       <p>
          You shouldn't need to write accessor methods (getters and setters) on a backing bean just to get at your data.
@@ -43,6 +44,7 @@
             What happens when this page loads?
          </a>
       </p>
+      -->
       
    </ui:define>
 

Modified: examples/trunk/booking-simplified/src/main/webapp/book.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/book.xhtml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/book.xhtml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -25,14 +25,14 @@
          <h:form id="bookingForm">
             <fieldset>
                   
-               <p:input id="checkinDate" label="Check-in date">
-                  <h:inputText id="input" value="#{booking.checkinDate}" binding="#{bookingFormControls.checkinDate}">
+               <p:input id="checkInDate">
+                  <h:inputText id="input" value="#{booking.checkinDate}">
                      <f:convertDateTime type="date" pattern="MM/dd/yyyy"/>
                   </h:inputText>
                </p:input>
 
-               <p:input id="checkoutDate" label="Check-out date">
-                  <h:inputText id="input" value="#{booking.checkoutDate}" binding="#{bookingFormControls.checkoutDate}">
+               <p:input id="checkOutDate">
+                  <h:inputText id="input" value="#{booking.checkoutDate}">
                      <f:convertDateTime type="date" pattern="MM/dd/yyyy"/>
                   </h:inputText>
                </p:input>
@@ -57,30 +57,33 @@
                </p:input>
 
                <p:input id="creditCardNumber" inputs="2">
-                  <h:inputText id="input" value="#{booking.creditCardNumber}"/>
+                  <h:inputText id="number" value="#{booking.creditCardNumber}"/>
                   #{' '}
-                  <h:selectOneMenu id="input2" value="#{booking.creditCardType}">
+                  <h:selectOneMenu id="type" value="#{booking.creditCardType}">
                      <f:selectItem itemValue="#{null}" itemLabel="Select..." noSelectionOption="true"/>
                      <f:selectItems value="#{creditCardTypes}" var="_type" itemValue="#{_type}"/>
                   </h:selectOneMenu>
                </p:input>
 
                <p:input id="creditCardExpiry" inputs="2">
-                  <h:selectOneMenu id="input" value="#{booking.creditCardExpiryMonth}">
+                  <h:selectOneMenu id="month" value="#{booking.creditCardExpiryMonth}">
                      <f:selectItems value="#{months}" var="_month" itemValue="#{_month.number}" itemLabel="#{_month.shortName}"/>
                   </h:selectOneMenu>
-                  <h:selectOneMenu id="input2" value="#{booking.creditCardExpiryYear}">
+                  <h:selectOneMenu id="year" value="#{booking.creditCardExpiryYear}">
                      <f:selectItems value="#{creditCardExpiryYears}" var="_year" itemValue="#{_year}"/>
                   </h:selectOneMenu>
                </p:input>
 
                <div class="buttonBox">
-                  <h:commandButton id="proceed" value="Proceed" action="#{bookingAgent.validateBooking}"/>
+                  <h:commandButton id="proceed" value="Proceed" action="#{bookingAgent.validate}"/>
                   #{' '}
                   <h:commandButton id="cancel" value="Cancel" action="#{bookingAgent.cancel}" immediate="true"/>
                </div>
                
             </fieldset>
+            
+            <s:validateForm validatorId="reservationDateRangeValidator" 
+            	fields="beginDate=checkInDate:input endDate=checkOutDate:input"/>
          </h:form>
       </div>
 
@@ -88,6 +91,7 @@
 
    <ui:define name="sidebar">
 
+      <!--
       <h1>Workspace management</h1>
       <p>
          As you can see, Seam makes it easy to work in multiple windows or multiple browser tabs. But you can even
@@ -98,8 +102,8 @@
          <a href="#" onclick="window.open('exp/workspaceExp.html','exp','width=752,height=500,scrollbars=yes');">
             How does the workspace list work?
          </a>
-
       </p>
+      -->
 
    </ui:define>
 

Modified: examples/trunk/booking-simplified/src/main/webapp/confirm.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/confirm.xhtml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/confirm.xhtml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -50,6 +50,7 @@
    </ui:define>
 
    <ui:define name="sidebar">
+      <!--
       <h1>Back button navigation</h1>
       <p>
          When you click "Confirm", the new booking is written to the database,
@@ -64,6 +65,7 @@
             What happens when the conversation ends?
          </a>
       </p>
+      -->
    </ui:define>
 
 </ui:composition>

Modified: examples/trunk/booking-simplified/src/main/webapp/home.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/home.xhtml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/home.xhtml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -14,15 +14,17 @@
          <h1>About this example application</h1>
 
          <p>
-            This sample application demonstrates how easy it is to develop stateful web applications using JBoss Seam.
-            Just register, login, and book a room to see Seam in action. Throughout the application you'll see popup
-            links like the ones at the bottom of this page. Click them to see how the application works under the hood.
+            This sample application demonstrates how easy it is to develop stateful web applications using Java EE 6
+            with portable Seam modules. Just register, login, and book a room to see the future of Java EE in action.
+            Throughout the application you'll see popup links like the ones at the bottom of this page. Click them to
+            see how the application works under the hood.
          </p>
 
          <p>
             Note: Please do NOT enter personal information or your credit card number in this sample application.
          </p>
 
+         <!--
          <p>
             <a href="#" onclick="window.open('exp/introExp.html','exp','width=752,height=500,scrollbars=yes');">
                What is Seam?
@@ -34,6 +36,7 @@
                What happens when I login?
             </a>
          </p>
+         -->
 
       </div>
    </ui:define>
@@ -42,7 +45,7 @@
       <h:form id="login" rendered="#{not identity.loggedIn}">
          <fieldset>
             <div>
-               <h:outputLabel for="username" value="Login name"/>
+               <h:outputLabel for="username" value="Username"/>
                <h:inputText id="username" value="#{credentials.username}" style="width: 175px;"/>
                <div class="errors"><h:message for="username"/></div>
             </div>
@@ -51,7 +54,7 @@
                <h:inputSecret id="password" value="#{credentials.password}" style="width: 175px;"/>
             </div>
             <div class="errors"><h:messages id="messages" globalOnly="true"/></div>
-            <div class="buttonBox"><h:commandButton id="login" action="#{identity.login}" value="Account Login"/></div>
+            <div class="buttonBox"><h:commandButton id="login" action="#{identity.login}" value="Login"/></div>
             <div class="notes"><h:link id="register" outcome="/register.xhtml" value="Register New User"/></div>
             <div class="subnotes">
                Or use a demo account:

Modified: examples/trunk/booking-simplified/src/main/webapp/hotel.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/hotel.xhtml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/hotel.xhtml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -15,7 +15,7 @@
    <ui:define name="content">
 
       <div class="section">
-         <h1>View Hotel</h1>
+         <h1>Hotel Details</h1>
       </div>
 
       <div class="section">

Modified: examples/trunk/booking-simplified/src/main/webapp/password.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/password.xhtml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/password.xhtml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -24,7 +24,7 @@
          
             <fieldset>
             
-               <p:input id="old">
+               <p:input id="current">
                   <h:inputSecret id="password"  value="#{currentUser.password}"/>
                </p:input>
             
@@ -45,7 +45,7 @@
             </fieldset>
             
             <s:validateForm validatorId="passwordConfirmValidator" 
-            	fields="oldPassword=old:password newPassword=new:password confirmNewPassword=confirm:password"/>
+            	fields="oldPassword=current:password newPassword=new:password confirmNewPassword=confirm:password"/>
          </h:form>
       </div>
 

Modified: examples/trunk/booking-simplified/src/main/webapp/search.xhtml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/search.xhtml	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/main/webapp/search.xhtml	2010-06-17 01:01:35 UTC (rev 13210)
@@ -34,13 +34,11 @@
          <h1>Search Hotels</h1>
 
          <h:form id="searchForm" prependId="false">
-            <fieldset> 
-               <h:inputText id="query" value="#{searchCriteria.query}" style="width: 165px;">
+            <fieldset>
+               <h:inputText id="query" value="#{searchCriteria.query}" style="width: 165px;" autocomplete="off">
                   <f:ajax event="keyup" listener="#{hotelSearch.find}" render=":searchResults" onevent="controlSpinner"/>
                </h:inputText>
                #{' '}
-               <h:outputLabel id="lblPageSize" for="pageSize" value="View:"/>
-               #{' '}
                <h:selectOneMenu id="pageSize" value="#{searchCriteria.pageSize}">
                   <f:ajax listener="#{hotelSearch.find}" render=":searchResults" onevent="controlSpinner"/>
                   <f:selectItem itemLabel="5 hotels per page" itemValue="5"/>
@@ -154,6 +152,7 @@
 
    <ui:define name="sidebar">
 
+      <!--
       <h1>State management in Seam</h1>
       <p>
          State in Seam is <em>contextual</em>. When you click "Find Hotels", the application
@@ -171,6 +170,7 @@
             How does the search page work?
          </a>
       </p>
+      -->
 
    </ui:define>
 

Modified: examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/booking/BookingAgentTest.java
===================================================================
--- examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/booking/BookingAgentTest.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/booking/BookingAgentTest.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -14,7 +14,6 @@
 import org.jboss.arquillian.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.seam.examples.booking.account.Authenticated;
-import org.jboss.seam.examples.booking.controls.BookingFormControls;
 import org.jboss.seam.examples.booking.model.Booking;
 import org.jboss.seam.examples.booking.model.CreditCardType;
 import org.jboss.seam.examples.booking.model.Hotel;
@@ -37,7 +36,16 @@
    @Deployment
    public static Archive<?> createTestArchive()
    {
-      WebArchive war = ShrinkWrap.create("test.war", WebArchive.class).addPackage(Hotel.class.getPackage()).addClasses(BookingAgent.class, BookingAgentBean.class, Confirmed.class, Authenticated.class, BookingEvent.class, BookingFormControls.class, NoOpLogger.class).addLibraries(MavenArtifactResolver.resolve("joda-time:joda-time:1.6"), MavenArtifactResolver.resolve("org.jboss.seam.international:seam-international-api:3.0.0.Alpha1"), MavenArtifactResolver.resolve("org.jboss.seam.international:seam-international:3.0.0.Alpha1")).addWebResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml").addWebResource(new ByteArrayAsset(new byte[0]), "beans.xml");
+      WebArchive war = ShrinkWrap.create("test.war", WebArchive.class)
+            .addPackage(Hotel.class.getPackage())
+            .addClasses(BookingAgent.class, BookingAgentBean.class, Confirmed.class,
+                  Authenticated.class, BookingEvent.class, NoOpLogger.class)
+            .addLibraries(
+                  MavenArtifactResolver.resolve("joda-time:joda-time:1.6"),
+                  MavenArtifactResolver.resolve("org.jboss.seam.international:seam-international-api:3.0.0.Alpha1"),
+                  MavenArtifactResolver.resolve("org.jboss.seam.international:seam-international:3.0.0.Alpha1"))
+            .addWebResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml")
+            .addWebResource(new ByteArrayAsset(new byte[0]), "beans.xml");
       return war;
    }
 

Modified: examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/support/NoOpLogger.java
===================================================================
--- examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/support/NoOpLogger.java	2010-06-16 22:50:28 UTC (rev 13209)
+++ examples/trunk/booking-simplified/src/test/java/org/jboss/seam/examples/booking/support/NoOpLogger.java	2010-06-17 01:01:35 UTC (rev 13210)
@@ -1,4 +1,4 @@
-/*
+/* 
  * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a



More information about the seam-commits mailing list