org.shept.org.springframework.web.bind.support
public interface ComponentPostprocessor
| Modifier and Type | Method and Description |
|---|---|
void |
postHandle(org.springframework.web.context.request.WebRequest request,
org.springframework.web.servlet.ModelAndView modelAndView,
String componentPath)
Initialize a Postprocessor for the given request.
|
void postHandle(org.springframework.web.context.request.WebRequest request,
org.springframework.web.servlet.ModelAndView modelAndView,
String componentPath)
PageableList list = (PageableList) ComponentUtils.getComponent(modelAndView, componentPath);
// finally contribute to modelAndView
if (modelAndView != null) { // should be checked because the same segment may occur multiple times
modelAndView("someName", someObject);
}
There are lots of examples in the shept demo implementations.
Postprocessors should usually be located in the ../web/controller/postprocessors package of your app.request - the web request that the data binding happens withinmodelAndView - the ModelAndViewcomponentPath - the path within the bound objectCopyright © 2014. All Rights Reserved.