FileDocCategorySizeDatePackage
SubmitBikeController.javaAPI DocExample1095Sat Apr 23 18:39:32 BST 2005com.springbook

SubmitBikeController

public class SubmitBikeController extends Object implements org.springframework.web.servlet.mvc.Controller

Fields Summary
private RentABike
facade
Constructors Summary
Methods Summary
public RentABikegetFacade()

        return facade;
    
public org.springframework.web.servlet.ModelAndViewhandleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)


        Bike bike = new Bike(request.getParameter("manufacturer"), request.getParameter("model"),
                             new Integer(request.getParameter("frame")).intValue(),
                             request.getParameter("serialNo"),
                             new Double(request.getParameter("weight")).doubleValue(),
                             request.getParameter("status"));
        facade.saveBike(bike);
        return new ModelAndView("bikes.jsp", "rentaBike", facade);
    
public voidsetFacade(RentABike facade)

        this.facade = facade;