Created
February 17, 2010 10:15
-
-
Save ovstetun/306485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
@Controller | |
@RequestMapping("/person/{id}/overview") | |
public class MyController { | |
... | |
@ModelAttribute | |
public Person getPerson(@PathVariable final long id, final HttpServletRequest request) { | |
final Person soknad = personRepository.fetch(id); | |
return soknad; | |
} | |
@ModelAttribute | |
public PersonOverview getPersonOverview(@PathVariable final long overViewId, final Person person) { | |
return person.getOverview(overViewId); | |
} | |
@RequestMapping(method = RequestMethod.GET) | |
public String showOverView() { | |
return "personOverview"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment