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

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Jun 18 18:33:37 EDT 2010


Author: lincolnthree
Date: 2010-06-18 18:33:37 -0400 (Fri, 18 Jun 2010)
New Revision: 13261

Modified:
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/ConfirmPasswordValidator.java
   examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/CurrentPasswordValidator.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/Registrar.java
   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/BookingHistory.java
   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/security/Authenticator.java
   examples/trunk/booking-simplified/src/main/resources/messages.properties
   examples/trunk/booking-simplified/src/main/resources/messages_de.properties
Log:
Updated messages keys

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/ConfirmPasswordValidator.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/ConfirmPasswordValidator.java	2010-06-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/ConfirmPasswordValidator.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -58,7 +58,7 @@
       {
          throw new ValidatorException(
             new FacesMessage(messageBuilder.get().text(
-               new DefaultBundleKey("account.passwordsDoNotMatch"))
+               new DefaultBundleKey("account_passwordsDoNotMatch"))
                   // targets not honored yet
                   //.targets(fieldMap.get("confirmPassword").getClientId())
                   .build().getText()));

Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/CurrentPasswordValidator.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/CurrentPasswordValidator.java	2010-06-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/CurrentPasswordValidator.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -57,7 +57,7 @@
           * This is an ugly way to put i18n in FacesMessages: https://jira.jboss.org/browse/SEAMFACES-24
           */
          throw new ValidatorException(new FacesMessage(msg.get().text(
-                  new DefaultBundleKey("account.passwordNotConfirmed")).build()
+                  new DefaultBundleKey("account_passwordNotConfirmed")).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-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManager.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -59,7 +59,7 @@
    public void changePassword()
    {
       em.merge(user);
-      messages.info(new DefaultBundleKey("account.passwordChanged")).textDefault("Password successfully updated.");
+      messages.info(new DefaultBundleKey("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-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/Registrar.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -74,7 +74,7 @@
          registered = true;
          em.persist(newUser);
 
-         messages.info(new DefaultBundleKey("registration.registered")).textDefault("You have been successfully registered as the user {0}! You can now login.").textParams(newUser.getUsername());
+         messages.info(new DefaultBundleKey("registration_registered")).textDefault("You have been successfully registered as the user {0}! You can now login.").textParams(newUser.getUsername());
       }
       else
       {
@@ -101,7 +101,7 @@
    {
       if (facesContext.isValidationFailed() || registrationInvalid)
       {
-         messages.warn(new DefaultBundleKey("registration.invalid")).textDefault("Invalid registration. Please correct the errors and try again.");
+         messages.warn(new DefaultBundleKey("registration_invalid")).textDefault("Invalid registration. Please correct the errors and try again.");
       }
    }
 
@@ -143,7 +143,7 @@
       User existing = em.find(User.class, newUser.getUsername());
       if (existing != null)
       {
-         messages.warn(new BundleKey("messages", "account.usernameTaken")).textDefault("The username '{0}' is already taken. Please choose another username.").targets(usernameInput.getClientId()).textParams(newUser.getUsername());
+         messages.warn(new BundleKey("messages", "account_usernameTaken")).textDefault("The username '{0}' is already taken. Please choose another username.").targets(usernameInput.getClientId()).textParams(newUser.getUsername());
          return false;
       }
 

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-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgent.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -108,7 +108,7 @@
       // for demo convenience
       booking.setCreditCardNumber("1111222233334444");
 
-      messages.info(new DefaultBundleKey("booking.initiated")).textDefault("You've initiated a booking at the {0}.").textParams(booking.getHotel().getName());
+      messages.info(new DefaultBundleKey("booking_initiated")).textDefault("You've initiated a booking at the {0}.").textParams(booking.getHotel().getName());
    }
 
    public void validate()
@@ -135,7 +135,7 @@
    public void onBookingComplete(@Observes(during = TransactionPhase.AFTER_SUCCESS) @Confirmed final Booking booking)
    {
       log.info(messageBuilder.get().text("New booking at the {0} confirmed for {1}").textParams(booking.getHotel().getName(), booking.getUser().getName()).build().getText());
-      messages.info(new DefaultBundleKey("booking.confirmed")).textDefault("You're booked to stay at the {0} {1}.").textParams(booking.getHotel().getName(), new PrettyTime(locale).format(booking.getCheckinDate()));
+      messages.info(new DefaultBundleKey("booking_confirmed")).textDefault("You're booked to stay at the {0} {1}.").textParams(booking.getHotel().getName(), new PrettyTime(locale).format(booking.getCheckinDate()));
    }
 
    @Produces

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-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistory.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -110,14 +110,14 @@
       if (booking != null)
       {
          em.remove(booking);
-         messages.info(new DefaultBundleKey("booking.canceled"))
+         messages.info(new DefaultBundleKey("booking_canceled"))
                .textDefault("The booking at the {0} on {1} has been canceled.")
                .textParams(selectedBooking.getHotel().getName(),
                      DateFormat.getDateInstance(SimpleDateFormat.MEDIUM).format(selectedBooking.getCheckinDate()));
       }
       else
       {
-         messages.info(new DefaultBundleKey("booking.doesNotExist"))
+         messages.info(new DefaultBundleKey("booking_doesNotExist"))
                .textDefault("Our records indicate that the booking you selected has already been canceled.");
       }
 

Modified: 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	2010-06-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ReservationDateRangeValidator.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -66,14 +66,14 @@
       calendar.add(Calendar.DAY_OF_MONTH, -1);
       if (beginDate.before(calendar.getTime()))
       {
-         String message = messageBuilder.get().text(new DefaultBundleKey("booking.checkInNotFutureDate"))
+         String message = messageBuilder.get().text(new DefaultBundleKey("booking_checkInNotFutureDate"))
          // FIXME the component should come through via injection
                .targets(fieldMap.get("beginDate").getClientId()).build().getText();
          throw new ValidatorException(new FacesMessage(message));
       }
       else if (!beginDate.before(endDate))
       {
-         String message = messageBuilder.get().text(new DefaultBundleKey("booking.checkOutBeforeCheckIn"))
+         String message = messageBuilder.get().text(new DefaultBundleKey("booking_checkOutBeforeCheckIn"))
          // FIXME the component should come through via injection
                .targets(fieldMap.get("endDate").getClientId()).build().getText();
          throw new ValidatorException(new FacesMessage(message));

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-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java	2010-06-18 22:33:37 UTC (rev 13261)
@@ -64,7 +64,7 @@
       log.get().info("Logging in " + credentials.getUsername());
       if ((credentials.getUsername() == null) || (credentials.getPassword() == null))
       {
-         messages.info(new DefaultBundleKey("identity.loginFailed"));
+         messages.info(new DefaultBundleKey("identity_loginFailed"));
          return false;
       }
 
@@ -72,12 +72,12 @@
       if ((user != null) && user.getPassword().equals(credentials.getPassword()))
       {
          loginEventSrc.fire(user);
-         messages.info(new DefaultBundleKey("identity.loggedIn"), user.getName());
+         messages.info(new DefaultBundleKey("identity_loggedIn"), user.getName());
          return true;
       }
       else
       {
-         messages.info(new DefaultBundleKey("identity.loginFailed"));
+         messages.info(new DefaultBundleKey("identity_loginFailed"));
          return false;
       }
    }

Modified: examples/trunk/booking-simplified/src/main/resources/messages.properties
===================================================================
--- examples/trunk/booking-simplified/src/main/resources/messages.properties	2010-06-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/resources/messages.properties	2010-06-18 22:33:37 UTC (rev 13261)
@@ -1,18 +1,18 @@
-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} 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.
-account.passwordsDoNotMatch=Passwords do not match. Please re-type the new password.
-account.usernameTaken=The username '{0}' is already taken. Please choose another username.
-registration.registered=You have been successfully registered as the user {0}! You may now login.
-registration.invalid=Invalid registration. Please correct the errors and try again.
-identity.loggedOut=You have successfully ended your session.
-identity.loggedIn=You're signed in as {0}.
-identity.loginFailed=Invalid username or password.
+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} 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.
+account_passwordsDoNotMatch=Passwords do not match. Please re-type the new password.
+account_usernameTaken=The username '{0}' is already taken. Please choose another username.
+registration_registered=You have been successfully registered as the user {0}! You may now login.
+registration_invalid=Invalid registration. Please correct the errors and try again.
+identity_loggedOut=You have successfully ended your session.
+identity_loggedIn=You're signed in as {0}.
+identity_loginFailed=Invalid username or password.
 
 home_header=About this example application
 home_body=This sample application demonstrates how easy it is to develop stateful web applications using Java EE 6 augmented 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 notes in the sidebar that explain how this platform helps you meet enterprise application requirements.

Modified: examples/trunk/booking-simplified/src/main/resources/messages_de.properties
===================================================================
--- examples/trunk/booking-simplified/src/main/resources/messages_de.properties	2010-06-18 22:11:07 UTC (rev 13260)
+++ examples/trunk/booking-simplified/src/main/resources/messages_de.properties	2010-06-18 22:33:37 UTC (rev 13261)
@@ -1,18 +1,18 @@
-booking.initiated=Sie haben eine Buchung auf leitete die {0}.
-booking.checkInNotFutureDate=Check-in Datum muss in der Zukunft liegen.
-booking.checkOutBeforeCheckIn=Abreisedatum muss nach dem Check-in Datum sein.
-booking.confirmed=Du bist gebucht, um zu bleiben {0} {1}.
-booking.canceled=Ihre Buchung auf dem {0} auf {1} wurde abgebrochen.
-booking.doesNotExist=Unsere Aufzeichnungen zeigen, dass die Buchung Sie wurde bereits abgesagt ausgewählt.
-account.passwordChanged=Passwort erfolgreich aktualisiert.
-account.passwordNotConfirmed=Ihr aktuelles Passwort ungültig sei. Bitte versuchen Sie es erneut.
-account.passwordsDoNotMatch=Passwörter stimmen nicht überein. Bitte wiederholen Sie das neue Kennwort.
-account.usernameTaken=Der Benutzername '{0}' ist bereits vergeben. Bitte wählen Sie einen anderen Benutzernamen.
-registration.registered=Sie haben sich erfolgreich als Benutzer {0} registriert! Sie können sich jetzt anmelden.
-registration.invalid=Ungültige Anmeldung. Bitte korrigieren Sie den Fehler und versuchen Sie es erneut.
-identity.loggedOut=Sie erfolgreich Ihre Sitzung beendet haben.
-identity.loggedIn=Du bist angemeldet als unterzeichneten {0}.
-identity.loginFailed=Ungültiger Benutzername oder Kennwort.
+booking_initiated=Sie haben eine Buchung auf leitete die {0}.
+booking_checkInNotFutureDate=Check-in Datum muss in der Zukunft liegen.
+booking_checkOutBeforeCheckIn=Abreisedatum muss nach dem Check-in Datum sein.
+booking_confirmed=Du bist gebucht, um zu bleiben {0} {1}.
+booking_canceled=Ihre Buchung auf dem {0} auf {1} wurde abgebrochen.
+booking_doesNotExist=Unsere Aufzeichnungen zeigen, dass die Buchung Sie wurde bereits abgesagt ausgewählt.
+account_passwordChanged=Passwort erfolgreich aktualisiert.
+account_passwordNotConfirmed=Ihr aktuelles Passwort ungültig sei. Bitte versuchen Sie es erneut.
+account_passwordsDoNotMatch=Passwörter stimmen nicht überein. Bitte wiederholen Sie das neue Kennwort.
+account_usernameTaken=Der Benutzername '{0}' ist bereits vergeben. Bitte wählen Sie einen anderen Benutzernamen.
+registration_registered=Sie haben sich erfolgreich als Benutzer {0} registriert! Sie können sich jetzt anmelden.
+registration_invalid=Ungültige Anmeldung. Bitte korrigieren Sie den Fehler und versuchen Sie es erneut.
+identity_loggedOut=Sie erfolgreich Ihre Sitzung beendet haben.
+identity_loggedIn=Du bist angemeldet als unterzeichneten {0}.
+identity_loginFailed=Ungültiger Benutzername oder Kennwort.
 
 home_header=Über dieses Beispiel-Anwendung
 home_body=Dieses Beispiel demonstriert, wie einfach es ist, EE-Module zu entwickeln stateful Web-Applikationen mit Java 6 mit tragbaren Augmented Seam.  Just register, login, and book a room to see the future of Java EE in action.  Einfach registrieren, einloggen, und buchen Sie ein Zimmer zum Handeln sieht die Zukunft von Java EE in. Throughout the application you'll see notes in the sidebar that explain how this platform helps you meet enterprise application requirements. Während der Anwendung, die Sie in der Seitenleiste sehen Noten, die erklären, wie diese Plattform hilft Ihnen, Enterprise Application Anforderungen.



More information about the seam-commits mailing list