From b5f03191bb4671f6d3c7677c0024f088bc6cef00 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Tue, 21 Aug 2007 05:11:58 +0000 Subject: [PATCH] more polish --- .../booking-jsf/src/main/java/import.sql | 3 +- .../webflow/samples/booking/app/User.java | 36 +++++++++---------- .../booking/flow/main/MainActions.java | 2 +- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/spring-webflow-samples/booking-jsf/src/main/java/import.sql b/spring-webflow-samples/booking-jsf/src/main/java/import.sql index 56a353ab..7c57d9d0 100755 --- a/spring-webflow-samples/booking-jsf/src/main/java/import.sql +++ b/spring-webflow-samples/booking-jsf/src/main/java/import.sql @@ -1,5 +1,4 @@ -insert into Customer (username, password, name) values ('springer', 'springrocks', 'Spring User') -insert into Customer (username, password, name) values ('demo', 'demo', 'Demo User') +insert into Customer (username, password, name) values ('springer', 'springrocks', 'Springer') insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 199, 'Westin Diplomat', '3555 S. Ocean Drive', 'Hollywood', 'FL', '33019', 'USA') insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA') insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA') diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/app/User.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/app/User.java index 465c517e..797b3e13 100755 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/app/User.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/app/User.java @@ -18,26 +18,10 @@ public class User implements Serializable { public User() { } - public User(String name, String password, String username) { - this.name = name; - this.password = password; + public User(String username, String password, String name) { this.username = username; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { this.password = password; + this.name = name; } @Id @@ -49,6 +33,22 @@ public class User implements Serializable { this.username = username; } + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + @Override public String toString() { return "User(" + username + ")"; diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java index d5725033..66a7a6c7 100644 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/flow/main/MainActions.java @@ -20,7 +20,7 @@ public class MainActions extends MultiAction { } public Event initCurrentUser(RequestContext context) { - User user = new User("Springer", "springrocks", "Spring User"); + User user = new User("springer", "springrocks", "Springer"); context.getConversationScope().put("user", user); return success(); }