Constructor Summary
Constructors
Creates a new model and view.
Creates a new model and view.
Method Summary
All Methods Instance Methods Concrete Methods
Copy all the attributes into the model.
Sets the locale used when rendering the view, if the template engine supports setting it.
Constructor Details
MapModelAndView
Creates a new model and view.
Parameters:
view
- View name must include file extension.
model
- View model.
MapModelAndView
public MapModelAndView (@NonNull
String view)
Creates a new model and view.
Parameters:
view
- View name must include file extension.
Method Details
put
Put a model attribute.
Parameters:
name
- Name.
value
- Value.
Returns:
This model and view.
put
Copy all the attributes into the model.
Parameters:
attributes
- Attributes.
Returns:
This model and view.
setLocale
Sets the locale used when rendering the view, if the template engine supports setting it.
Specifying null
triggers a fallback to a locale determined by the current request.
Overrides:
setLocale
in class ModelAndView <Map <String ,Object >>
Parameters:
locale
- The locale used when rendering the view.
Returns:
This instance.