|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.samples.petclinic.web.ClinicController
@Controller public class ClinicController
Annotation-driven MultiActionController that handles all non-form URL's.
Constructor Summary | |
---|---|
ClinicController(Clinic clinic)
|
Method Summary | |
---|---|
org.springframework.web.servlet.ModelAndView |
ownerHandler(int ownerId)
Displays the specified owner. |
org.springframework.ui.ModelMap |
vetsHandler()
Displays all vets. |
org.springframework.web.servlet.ModelAndView |
visitsHandler(int petId)
Displays a list of all visits for a specified pet. |
java.lang.String |
welcomeHandler()
Displays the the welcome view. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClinicController(Clinic clinic)
Method Detail |
---|
@RequestMapping(value="/") public java.lang.String welcomeHandler()
Note that this handler relies on the RequestToViewNameTranslator to determine the logical view name based on the request URL: "/welcome.do" -> "welcome".
@RequestMapping(value="/vets") public org.springframework.ui.ModelMap vetsHandler()
Note that this handler returns a plain ModelMap
object instead of
a ModelAndView, thus leveraging convention-based model attribute names.
It relies on the RequestToViewNameTranslator to determine the logical
view name based on the request URL: "/vets.do" -> "vets".
@RequestMapping(value="/owners/{ownerId}") public org.springframework.web.servlet.ModelAndView ownerHandler(@PathVariable(value="ownerId") int ownerId)
ownerId
- the ID of the owner to display
@RequestMapping(value="/owners/*/pets/{petId}/visits", method=GET) public org.springframework.web.servlet.ModelAndView visitsHandler(@PathVariable int petId)
petId
- the ID of the pet whose visits to display
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |