Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.68 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Java Controller what code to be in?
  2. public ModelAndView offersMapView(HttpServletRequest request, HttpServletResponse response) {
  3.  
  4. Map<String, Object> contentMap = getServiceLocator().getHyperLocalService().getOffersHubContents(searchPostcode, gmapKey, ip);
  5.  
  6.             return getViewGenerator().generateOffersHubMapView(brand, contentMap);
  7. }
  8.        
  9. public ModelAndView generateOffersHubMapView(Brand brand, Map<String, Object> contentMap) {    
  10.         ModelAndView mv = POGAModelandView.createWebModelAndView(brand, WLConstants.__HUB_OFFERS);
  11.         mv.addAllObjects(contentMap);      
  12.  
  13.         return mv;
  14.     }
  15.        
  16. Even if there are only 3 lines of processing, make them separate methods