org.springframework.samples.petclinic.web
Class EditOwnerForm
java.lang.Object
org.springframework.samples.petclinic.web.EditOwnerForm
@Controller
@RequestMapping(value="/owners/{ownerId}/edit")
@SessionAttributes(types=Owner.class)
public class EditOwnerForm
- extends java.lang.Object
JavaBean Form controller that is used to edit an existing Owner
.
- Author:
- Juergen Hoeller, Ken Krebs, Arjen Poutsma
Method Summary |
java.lang.String |
processSubmit(Owner owner,
org.springframework.validation.BindingResult result,
org.springframework.web.bind.support.SessionStatus status)
Processes an owner edit form submission. |
void |
setAllowedFields(org.springframework.web.bind.WebDataBinder dataBinder)
|
java.lang.String |
setupForm(int ownerId,
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 |
EditOwnerForm
public EditOwnerForm(Clinic clinic)
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)
- Displays an edit form for the specified owner.
- Parameters:
ownerId
- the ID of the owner to editmodel
- the input model
- Returns:
- the edit form view name
processSubmit
@RequestMapping(method=PUT)
public java.lang.String processSubmit(@ModelAttribute
Owner owner,
org.springframework.validation.BindingResult result,
org.springframework.web.bind.support.SessionStatus status)
- Processes an owner edit form submission.
- Parameters:
owner
- the ownerresult
- the binding resultsstatus
- the session status
- Returns:
- the next view name to display
Copyright © 2010. All Rights Reserved.