FileDocCategorySizeDatePackage
ListOrdersController.javaAPI DocExample1121Thu Dec 04 08:19:26 GMT 2003org.springframework.samples.jpetstore.web.spring

ListOrdersController

public class ListOrdersController extends Object implements org.springframework.web.servlet.mvc.Controller
author
Juergen Hoeller
since
01.12.2003

Fields Summary
private org.springframework.samples.jpetstore.domain.logic.PetStoreFacade
petStore
Constructors Summary
Methods Summary
public org.springframework.web.servlet.ModelAndViewhandleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

		UserSession userSession = (UserSession) WebUtils.getSessionAttribute(request, "userSession");
		String username = userSession.getAccount().getUsername();
		Map model = new HashMap();
		model.put("orderList", this.petStore.getOrdersByUsername(username));
		return new ModelAndView("ListOrders", model);
	
public voidsetPetStore(org.springframework.samples.jpetstore.domain.logic.PetStoreFacade petStore)

		this.petStore = petStore;