org.springframework.samples.petportal.portlet
Class PetSitesEditController
java.lang.Object
org.springframework.samples.petportal.portlet.PetSitesEditController
@Controller
@RequestMapping(value="EDIT")
@SessionAttributes(value="site")
public class PetSitesEditController
- extends java.lang.Object
This Controller simply populates the model with the current map
of 'petSites' and then forwards to the view from which a user can
add to or delete from the sites. The HandlerMapping maps to this
Controller when in EDIT mode while no valid 'action' parameter
is set. See 'WEB-INF/context/petsites-portlet.xml' for details.
- Author:
- Mark Fisher, Juergen Hoeller
Method Summary |
java.util.Properties |
getPetSites()
|
void |
populateSite(PetSite petSite,
org.springframework.validation.BindingResult result,
org.springframework.web.bind.support.SessionStatus status,
javax.portlet.ActionResponse response)
|
void |
removeSite(java.lang.String site,
javax.portlet.ActionResponse response)
|
void |
setPetSites(java.util.Properties petSites)
|
java.lang.String |
showPetSites()
|
java.lang.String |
showSiteForm(org.springframework.ui.Model model)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PetSitesEditController
public PetSitesEditController()
setPetSites
public void setPetSites(java.util.Properties petSites)
getPetSites
@ModelAttribute(value="petSites")
public java.util.Properties getPetSites()
showPetSites
@RequestMapping
public java.lang.String showPetSites()
showSiteForm
@RequestMapping(params="action=add")
public java.lang.String showSiteForm(org.springframework.ui.Model model)
populateSite
@RequestMapping(params="action=add")
public void populateSite(@ModelAttribute(value="site")
PetSite petSite,
org.springframework.validation.BindingResult result,
org.springframework.web.bind.support.SessionStatus status,
javax.portlet.ActionResponse response)
removeSite
@RequestMapping(params="action=delete")
public void removeSite(@RequestParam(value="site")
java.lang.String site,
javax.portlet.ActionResponse response)
John A. Lewis, Mark Fisher, Juergen Hoeller