|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.samples.petclinic.web.EditPetForm
@Controller @RequestMapping(value="/owners/*/pets/{petId}/edit") @SessionAttributes(value="pet") public class EditPetForm
JavaBean Form controller that is used to edit an existing Pet
.
Constructor Summary | |
---|---|
EditPetForm(Clinic clinic)
|
Method Summary | |
---|---|
java.lang.String |
deletePet(int petId)
Deletes a pet. |
java.util.Collection<PetType> |
populatePetTypes()
|
java.lang.String |
processSubmit(Pet pet,
org.springframework.validation.BindingResult result,
org.springframework.web.bind.support.SessionStatus status)
Processes a pet edit form submission. |
void |
setAllowedFields(org.springframework.web.bind.WebDataBinder dataBinder)
|
java.lang.String |
setupForm(int petId,
org.springframework.ui.Model model)
Displays an edit form for the specified owner. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EditPetForm(Clinic clinic)
Method Detail |
---|
@ModelAttribute(value="types") public java.util.Collection<PetType> populatePetTypes()
@InitBinder public void setAllowedFields(org.springframework.web.bind.WebDataBinder dataBinder)
@RequestMapping(method=GET) public java.lang.String setupForm(@PathVariable(value="petId") int petId, org.springframework.ui.Model model)
petId
- the ID of the pet to editmodel
- the input model
@RequestMapping(method={PUT,POST}) public java.lang.String processSubmit(@ModelAttribute(value="pet") Pet pet, org.springframework.validation.BindingResult result, org.springframework.web.bind.support.SessionStatus status)
pet
- the petresult
- the binding resultsstatus
- the session status
@RequestMapping(method=DELETE) public java.lang.String deletePet(@PathVariable int petId)
petId
- the ID of the pet to delete
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |