Code example for ModelAndView

Methods: getModel

0
            clientApp.setError("Client already exists!"); 
 
            return handleInternalRedirect(clientApp); 
        } 
 
        ModelAndView modelAndView = new ModelAndView("clientDetails"); 
        modelAndView.getModel().put("clientInfo", clientInfo); 
 
        return modelAndView; 
    } 
 
    @RequestMapping("/listRegisteredClients") 
    public ModelAndView listRegisteredClients() { 
        Set<Client> apps = clientManager.listRegisteredClients(); 
 
        ModelAndView modelAndView = new ModelAndView("registeredClientsList"); 
        modelAndView.getModelMap().put("clients", apps); 
        return modelAndView; 
    } 
 
Contextual code suggestions in your IDE  Get Codota for Java