FileDocCategorySizeDatePackage
EditBikeController.javaAPI DocExample1019Sun Apr 24 17:02:46 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.jsp");
        } else {
            System.out.println("bikeSerialNo == " + request.getParameter("bikeSerialNo"));
            Bike bike = facade.getBike(request.getParameter("bikeSerialNo"));
            return new ModelAndView("editBike.jsp", "bike", bike);
        }

    
public voidsetFacade(RentABike facade)

        this.facade = facade;