SWF-1243 Comprehensive update for JSF 2.0 support

This commit is contained in:
Rossen Stoyanchev
2010-06-02 19:47:34 +00:00
parent dcf9ad24b3
commit acc793c6a2
26 changed files with 316 additions and 164 deletions

View File

@@ -3,22 +3,30 @@ package org.springframework.webflow.samples.booking.jsf;
import java.util.Calendar;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import org.springframework.webflow.samples.booking.Booking;
import org.springframework.webflow.samples.booking.BookingService;
import org.springframework.webflow.samples.booking.Hotel;
@ManagedBean
@RequestScoped
public class BookingController {
@ManagedProperty("#{bookingService}")
private BookingService bookingService;
@ManagedProperty("#{hotelController.hotelId}")
private Long hotelId;
private Hotel hotel = new Hotel();
@ManagedProperty("#{booking}")
private Booking booking;
private Hotel hotel = new Hotel();
private boolean initialized = false;
public void setBookingService(BookingService bookingService) {

View File

@@ -1,12 +1,20 @@
package org.springframework.webflow.samples.booking.jsf;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;
import org.springframework.webflow.samples.booking.BookingService;
import org.springframework.webflow.samples.booking.Hotel;
@ManagedBean
@RequestScoped
public class HotelController {
@ManagedProperty("#{bookingService}")
private BookingService bookingService;
@ManagedProperty("#{param.id}")
private Long hotelId;
private Hotel hotel;

View File

@@ -2,6 +2,9 @@ package org.springframework.webflow.samples.booking.jsf;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;
import javax.faces.event.ActionEvent;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
@@ -10,6 +13,8 @@ import org.springframework.webflow.samples.booking.Booking;
import org.springframework.webflow.samples.booking.BookingService;
import org.springframework.webflow.samples.booking.SearchCriteria;
@ManagedBean
@RequestScoped
public class SearchController {
private SearchCriteria searchCriteria;
@@ -18,6 +23,7 @@ public class SearchController {
private DataModel hotels;
@ManagedProperty("#{bookingService}")
private BookingService bookingService;
public void setBookingService(BookingService bookingService) {