org.springframework.samples.petclinic.web
Class EditOwnerForm

java.lang.Object
  extended by 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

Constructor Summary
EditOwnerForm(Clinic clinic)
           
 
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
 

Constructor Detail

EditOwnerForm

public EditOwnerForm(Clinic clinic)
Method Detail

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 edit
model - 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 owner
result - the binding results
status - the session status
Returns:
the next view name to display


Copyright © 2010. All Rights Reserved.