FileDocCategorySizeDatePackage
SubmitBikeController.javaAPI DocExample1049Sat Apr 23 19:39:56 BST 2005com.springbook

SubmitBikeController

public class SubmitBikeController extends org.springframework.web.servlet.mvc.SimpleFormController

Fields Summary
private RentABike
facade
Constructors Summary
Methods Summary
protected java.lang.ObjectformBackingObject(javax.servlet.http.HttpServletRequest request)

        Bike bike = new Bike();
        if(request.getParameter("bikeSerialNo") != null) bike = facade.getBike(request.getParameter("bikeSerialNo"));
        return bike;
    
public RentABikegetFacade()

        return facade;
    
public org.springframework.web.servlet.ModelAndViewonSubmit(java.lang.Object command)


        Bike bike = (Bike)command;
        facade.saveBike(bike);
        return new ModelAndView(new RedirectView(getSuccessView()), "bikeStore", facade);
    
public voidsetFacade(RentABike facade)

        this.facade = facade;