org.springframework.samples.petclinic.web
Class AddPetForm
java.lang.Object
org.springframework.samples.petclinic.web.AddPetForm
@Controller
@RequestMapping(value="/owners/{ownerId}/pets/new")
@SessionAttributes(value="pet")
public class AddPetForm
- extends java.lang.Object
JavaBean form controller that is used to add a new Pet
to the
system.
- Author:
- Juergen Hoeller, Ken Krebs, Arjen Poutsma
Method Summary |
java.util.Collection<PetType> |
populatePetTypes()
|
java.lang.String |
processSubmit(Pet pet,
org.springframework.validation.BindingResult result,
org.springframework.web.bind.support.SessionStatus status)
|
void |
setAllowedFields(org.springframework.web.bind.WebDataBinder dataBinder)
|
java.lang.String |
setupForm(int ownerId,
org.springframework.ui.Model model)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddPetForm
public AddPetForm(Clinic clinic)
populatePetTypes
@ModelAttribute(value="types")
public java.util.Collection<PetType> populatePetTypes()
setAllowedFields
@InitBinder
public void setAllowedFields(org.springframework.web.bind.WebDataBinder dataBinder)
setupForm
@RequestMapping(method=GET)
public java.lang.String setupForm(@PathVariable(value="ownerId")
int ownerId,
org.springframework.ui.Model model)
processSubmit
@RequestMapping(method=POST)
public java.lang.String processSubmit(@ModelAttribute(value="pet")
Pet pet,
org.springframework.validation.BindingResult result,
org.springframework.web.bind.support.SessionStatus status)
Copyright © 2010. All Rights Reserved.