Example usage for Java org.springframework.web.servlet ModelAndView fields, constructors, methods, implement or subclass
The text is from its open source code.
ModelAndView(String viewName) Convenient constructor when there is no model data to expose. | |
ModelAndView(View view) Convenient constructor when there is no model data to expose. | |
ModelAndView(@Nullable String viewName, @Nullable Map Create a new ModelAndView given a view name, model, and HTTP status. | |
ModelAndView(String viewName, String modelName, Object modelObject) Convenient constructor to take a single model object. | |
ModelAndView(View view, String modelName, Object modelObject) Convenient constructor to take a single model object. | |
ModelAndView(String viewName, @Nullable Map Create a new ModelAndView given a view name and a model. | |
ModelAndView(View view, @Nullable Map Create a new ModelAndView given a View object and a model. | |
ModelAndView(String viewName, HttpStatus status) Create a new ModelAndView given a view name and HTTP status. | |
ModelAndView() Default constructor for bean-style usage: populating bean properties instead of passing in constructor arguments. |
ModelAndView | addAllObjects(@Nullable Map Add all attributes contained in the provided Map to the model. |
ModelAndView | addObject(String attributeName, @Nullable Object attributeValue) Add an attribute to the model. |
ModelAndView | addObject(Object attributeValue) Add an attribute to the model using parameter name generation. |
void | clear() Clear the state of this ModelAndView object. |
Map | getModel() Return the model map. |
Map | getModelInternal() Return the model map. |
ModelMap | getModelMap() Return the underlying ModelMap instance (never null ). |
HttpStatus | getStatus() Return the configured HTTP status for the response, if any. |
View | getView() Return the View object, or null if we are using a view name to be resolved by the DispatcherServlet via a ViewResolver. |
String | getViewName() Return the view name to be resolved by the DispatcherServlet via a ViewResolver, or null if we are using a View object. |
boolean | hasView() Indicate whether or not this ModelAndView has a view, either as a view name or as a direct View instance. |
boolean | isEmpty() Return whether this ModelAndView object is empty, i.e. |
boolean | isReference() Return whether we use a view reference, i.e. |
void | setView(@Nullable View view) Set a View object for this ModelAndView. |
void | setViewName(@Nullable String viewName) Set a view name for this ModelAndView, to be resolved by the DispatcherServlet via a ViewResolver. |
String | toString() Return diagnostic information about this model and view. |
boolean | wasCleared() Return whether this ModelAndView object is empty as a result of a call to #clear i.e. |