org.springframework.samples.petportal.portlet
Class DateFormatController
java.lang.Object
org.springframework.samples.petportal.portlet.DateFormatController
@Controller
@RequestMapping(value="EDIT")
public class DateFormatController
- extends java.lang.Object
This controller provides a simple example of modifying portlet preferences.
In this case, it allows the user to change the default date format.
- Author:
- Mark Fisher, Juergen Hoeller
Method Summary |
void |
changePreference(javax.portlet.PortletPreferences preferences,
java.lang.String dateFormat)
In the action phase, the dateFormat preference is modified. |
java.lang.String |
showPreferences(javax.portlet.PortletPreferences preferences,
org.springframework.ui.Model model)
In the render phase, the current format and available formats will be
exposed to the 'dateFormat' view via the model. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateFormatController
public DateFormatController()
showPreferences
@RequestMapping
public java.lang.String showPreferences(javax.portlet.PortletPreferences preferences,
org.springframework.ui.Model model)
- In the render phase, the current format and available formats will be
exposed to the 'dateFormat' view via the model.
changePreference
@RequestMapping
public void changePreference(javax.portlet.PortletPreferences preferences,
@RequestParam(value="dateFormat")
java.lang.String dateFormat)
throws java.lang.Exception
- In the action phase, the dateFormat preference is modified. To persist any
modifications, the PortletPreferences must be stored.
- Throws:
java.lang.Exception
John A. Lewis, Mark Fisher, Juergen Hoeller