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 07508b88..f1899dea 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 @@ -1,14 +1,9 @@ package org.springframework.webflow.samples.booking.flow.main; -import java.util.List; - -import org.springframework.faces.model.OneSelectionTrackingListDataModel; import org.springframework.webflow.action.MultiAction; import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.RequestContext; -import org.springframework.webflow.samples.booking.app.Booking; import org.springframework.webflow.samples.booking.app.BookingService; -import org.springframework.webflow.samples.booking.app.Hotel; import org.springframework.webflow.samples.booking.app.User; /** @@ -39,29 +34,4 @@ public class MainActions extends MultiAction { context.getConversationScope().put("user", user); return success(); } - - /** - * Find all active bookings made by the current user. - * @param context the current flow execution request context - * @return success - */ - public Event findCurrentUserBookings(RequestContext context) { - User user = (User) context.getConversationScope().get("user"); - List bookings = bookingService.findBookings(user.getUsername()); - context.getFlowScope().put("bookings", new OneSelectionTrackingListDataModel(bookings)); - return success(); - } - - /** - * Find all hotels that meet the current search criteria in flow scope. - * @param context the current flow execution request context - * @return success - */ - public Event findHotels(RequestContext context) { - SearchCriteria search = (SearchCriteria) context.getFlowScope().get("searchCriteria"); - List hotels = bookingService - .findHotels(search.getSearchString(), search.getPageSize(), search.getPage()); - context.getFlowScope().put("hotels", new OneSelectionTrackingListDataModel(hotels)); - return success(); - } }