Java org.springframework.web.servlet ModelAndView fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.web.servlet ModelAndView fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.web.servlet ModelAndView.

The text is from its open source code.

Subclass

org.springframework.web.servlet.ModelAndView has subclasses.
Click this link to see all its subclasses.

Constructor

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 model, @Nullable HttpStatus status)
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 model)
Create a new ModelAndView given a view name and a model.
ModelAndView(View view, @Nullable Map model)
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.

Method

ModelAndViewaddAllObjects(@Nullable Map modelMap)
Add all attributes contained in the provided Map to the model.
ModelAndViewaddObject(String attributeName, @Nullable Object attributeValue)
Add an attribute to the model.
ModelAndViewaddObject(Object attributeValue)
Add an attribute to the model using parameter name generation.
voidclear()
Clear the state of this ModelAndView object.
MapgetModel()
Return the model map.
MapgetModelInternal()
Return the model map.
ModelMapgetModelMap()
Return the underlying ModelMap instance (never null ).
HttpStatusgetStatus()
Return the configured HTTP status for the response, if any.
ViewgetView()
Return the View object, or null if we are using a view name to be resolved by the DispatcherServlet via a ViewResolver.
StringgetViewName()
Return the view name to be resolved by the DispatcherServlet via a ViewResolver, or null if we are using a View object.
booleanhasView()
Indicate whether or not this ModelAndView has a view, either as a view name or as a direct View instance.
booleanisEmpty()
Return whether this ModelAndView object is empty, i.e.
booleanisReference()
Return whether we use a view reference, i.e.
voidsetView(@Nullable View view)
Set a View object for this ModelAndView.
voidsetViewName(@Nullable String viewName)
Set a view name for this ModelAndView, to be resolved by the DispatcherServlet via a ViewResolver.
StringtoString()
Return diagnostic information about this model and view.
booleanwasCleared()
Return whether this ModelAndView object is empty as a result of a call to #clear i.e.