[seam-commits] Seam SVN: r13202 - in examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking: booking and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Jun 16 17:59:59 EDT 2010
Author: lincolnthree
Date: 2010-06-16 17:59:59 -0400 (Wed, 16 Jun 2010)
New Revision: 13202
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/PasswordManagerBean.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/BookingAgentBean.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/security/AuthenticatorBean.java
Log:
We have bundles...
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 21:43:20 UTC (rev 13201)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordConfirmValidator.java 2010-06-16 21:59:59 UTC (rev 13202)
@@ -68,12 +68,12 @@
* 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.properties", "account.passwordNotConfirmed")).build().getText()));
+ throw new ValidatorException(new FacesMessage(msg.info(new BundleKey("messages", "account.passwordNotConfirmed")).build().getText()));
}
if ((newPassword != null) && !newPassword.equals(confirmNewPassword))
{
- throw new ValidatorException(new FacesMessage(msg.info(new BundleKey("messages.properties", "account.passwordsDoNotMatch")).build().getText()));
+ throw new ValidatorException(new FacesMessage(msg.info(new BundleKey("messages", "account.passwordsDoNotMatch")).build().getText()));
}
}
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 21:43:20 UTC (rev 13201)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/PasswordManagerBean.java 2010-06-16 21:59:59 UTC (rev 13202)
@@ -40,9 +40,9 @@
public void changePassword()
{
em.merge(user);
- messages.info(new BundleKey("messages.properties", "account.passwordChanged")).textDefault("Password successfully updated.");
+ messages.info(new BundleKey("messages", "account.passwordChanged")).textDefault("Password successfully updated.");
changed = true;
- // messages.error(new BundleKey("messages.properties",
+ // messages.error(new BundleKey("messages",
// "account.passwordsDoNotMatch")).textDefault("Passwords do not match. Please re-type the new password.");
}
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 21:43:20 UTC (rev 13201)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/account/RegistrarBean.java 2010-06-16 21:59:59 UTC (rev 13202)
@@ -44,7 +44,7 @@
{
registered = true;
em.persist(newUser);
- messages.info(new BundleKey("messages.properties", "registration.registered")).textDefault("You have been successfully registered as the user {0}!").textParams(newUser.getUsername());
+ messages.info(new BundleKey("messages", "registration.registered")).textDefault("You have been successfully registered as the user {0}!").textParams(newUser.getUsername());
}
else
{
@@ -63,7 +63,7 @@
{
if (validationFailed || registrationInvalid)
{
- messages.warn(new BundleKey("messages.properties", "registration.invalid")).textDefault("Invalid registration. Please correct the errors and try again.");
+ messages.warn(new BundleKey("messages", "registration.invalid")).textDefault("Invalid registration. Please correct the errors and try again.");
}
}
@@ -97,7 +97,7 @@
{
if (!newUser.getPassword().equals(confirmPassword))
{
- messages.warn(new BundleKey("messages.properties", "account.passwordsDoNotMatch")).textDefault("Passwords do not match. Please re-type your password.").targets(formControls.getConfirmPasswordControlId());
+ messages.warn(new BundleKey("messages", "account.passwordsDoNotMatch")).textDefault("Passwords do not match. Please re-type your password.").targets(formControls.getConfirmPasswordControlId());
confirmPassword = null;
return false;
}
@@ -110,7 +110,7 @@
User existing = em.find(User.class, newUser.getUsername());
if (existing != null)
{
- messages.warn(new BundleKey("messages.properties", "account.usernameTaken")).textDefault("The username '{0}' is already taken. Please choose another username.").targets(formControls.getUsernameControlId()).textParams(newUser.getUsername());
+ messages.warn(new BundleKey("messages", "account.usernameTaken")).textDefault("The username '{0}' is already taken. Please choose another username.").targets(formControls.getUsernameControlId()).textParams(newUser.getUsername());
return false;
}
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 21:43:20 UTC (rev 13201)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java 2010-06-16 21:59:59 UTC (rev 13202)
@@ -103,7 +103,7 @@
calendar.add(Calendar.DAY_OF_MONTH, 1);
booking.setCheckoutDate(calendar.getTime());
hotelSelection = null;
- messages.info(new BundleKey("messages.properties", "booking.initiated")).textDefault("You've initiated a booking at {0}.").textParams(booking.getHotel().getName());
+ messages.info(new BundleKey("messages", "booking.initiated")).textDefault("You've initiated a booking at {0}.").textParams(booking.getHotel().getName());
}
public void validateBooking()
@@ -112,12 +112,12 @@
calendar.add(Calendar.DAY_OF_MONTH, -1);
if (booking.getCheckinDate().before(calendar.getTime()))
{
- messages.info(new BundleKey("messages.properties", "booking.checkInNotFutureDate")).textDefault("Check in date must be a future date").targets(formControls.getCheckinDateControlId());
+ 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.properties", "booking.checkOutBeforeCheckIn")).textDefault("Check out date must be after check in date").targets(formControls.getCheckoutDateControlId());
+ messages.info(new BundleKey("messages", "booking.checkOutBeforeCheckIn")).textDefault("Check out date must be after check in date").targets(formControls.getCheckoutDateControlId());
bookingValid = false;
}
else
@@ -133,7 +133,7 @@
// FIXME can't inject event object into bean with passivating scope
manager.fireEvent(new BookingEvent(booking), ConfirmedLiteral.INSTANCE);
log.info(mf.info("New booking at the {0} confirmed for {1}").textParams(booking.getHotel().getName(), booking.getUser().getName()).build().getText());
- messages.info(new BundleKey("messages.properties", "booking.confirmed")).textDefault("Booking confirmed.");
+ messages.info(new BundleKey("messages", "booking.confirmed")).textDefault("Booking confirmed.");
}
@End
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 21:43:20 UTC (rev 13201)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java 2010-06-16 21:59:59 UTC (rev 13202)
@@ -104,11 +104,11 @@
if (booking != null)
{
em.remove(booking);
- messages.info(new BundleKey("messages.properties", "booking.canceled")).textDefault("The booking at the {0} on {1,date} has been canceled.").textParams(selectedBooking.getHotel().getName(), selectedBooking.getCheckinDate());
+ 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());
}
else
{
- messages.info(new BundleKey("messages.properties", "booking.doesNotExist")).textDefault("Our records indicate that the booking you selected has already been canceled.");
+ messages.info(new BundleKey("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/security/AuthenticatorBean.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/AuthenticatorBean.java 2010-06-16 21:43:20 UTC (rev 13201)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/AuthenticatorBean.java 2010-06-16 21:59:59 UTC (rev 13202)
@@ -41,7 +41,7 @@
log.info("Logging in " + credentials.getUsername());
if (credentials.getUsername() == null || credentials.getPassword() == null)
{
- messages.info(new BundleKey("messages.properties", "identity.loginFailed"));
+ messages.info(new BundleKey("messages", "identity.loginFailed"));
return false;
}
@@ -49,12 +49,12 @@
if (user != null && user.getPassword().equals(credentials.getPassword()))
{
loginEventSrc.fire(user);
- messages.info(new BundleKey("messages.properties", "identity.loggedIn"));
+ messages.info(new BundleKey("messages", "identity.loggedIn"));
return true;
}
else
{
- messages.info(new BundleKey("messages.properties", "identity.loginFailed"));
+ messages.info(new BundleKey("messages", "identity.loginFailed"));
return false;
}
}
More information about the seam-commits
mailing list