Hi guys,
we are hust in train of doing our first Spring MVC steps, I have a very very basic question and hopefully someone of the seniors can answer: how do you treat modek refreshes? Sya we have a request (e.g. form submit via POST) which is caught by our controller and somehow modifies the model:
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@RequestMapping(method=RequestMethod.POST)
public ModelAndView loginUser(HttpServletRequest request,
HttpServletResponse response,
@RequestBody User user)
{
ourModel.addObject("username","bli bla blub");
return ourModel;
}
How do we inform the view about these changes as we have several objects there bound do ${username} but will not display the username, so my terrible guess is that Spring MVC only pushes changes to the view in case of URL changes...can anybody confirm? If so the whole Spring MVC approach is pretty much worthless as synchronization between model and view in terms of views watching the model and displaying changes is not provided - but maybe somenone of you guys knows how to resolve our issue...
thanx in advance, FLorian;


Reply With Quote
