java.lang.Object
io.jooby.ModelAndView<T>
- Direct Known Subclasses:
MapModelAndView
Used by template engines to renderer views.
- Since:
- 2.0.0
- Author:
- edgar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the locale used when rendering the view.getModel()
View data (a.k.a as model).getView()
View name with file extension, like:index.html
.static MapModelAndView
Creates a model and view backed by a map.static MapModelAndView
Creates a model and view backed by a map.Sets the locale used when rendering the view, if the template engine supports setting it.toString()
-
Constructor Details
-
ModelAndView
Creates a new model and view.- Parameters:
view
- View name must include file extension.model
- View model.
-
-
Method Details
-
map
Creates a model and view backed by a map.- Parameters:
view
- View name.- Returns:
- A map model and view.
-
map
Creates a model and view backed by a map.- Parameters:
view
- View name.model
- Map instance.- Returns:
- A map model and view.
-
setLocale
Sets the locale used when rendering the view, if the template engine supports setting it. Specifyingnull
triggers a fallback to a locale determined by the current request.- Parameters:
locale
- The locale used when rendering the view.- Returns:
- This instance.
-
getModel
View data (a.k.a as model).- Returns:
- View data (a.k.a as model).
-
getView
View name with file extension, like:index.html
.- Returns:
- View name with file extension, like:
index.html
.
-
getLocale
Returns the locale used when rendering the view. Defaults tonull
, which triggers a fallback to a locale determined by the current request.- Returns:
- The locale used when rendering the view.
-
toString
-