FileDocCategorySizeDatePackage
EditBikeController.javaAPI DocExample1011Sat Apr 23 19:52:40 BST 2005com.springbook

EditBikeController

public class EditBikeController 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)

        if(request.getParameter("bikeSerialNo") == null) {
            System.out.println("bikeSerialNo was null");
            return new ModelAndView("editBike");
        } else {
            System.out.println("bikeSerialNo == " + request.getParameter("bikeSerialNo"));
            Bike bike = facade.getBike(request.getParameter("bikeSerialNo"));
            return new ModelAndView("editBike", "bike", bike);
        }

    
public voidsetFacade(RentABike facade)

        this.facade = facade;