HandlerResult to the HTTP response.
In contrast to an Encoder
which is a singleton and encodes any object of a given type, a View
is typically selected by name and resolved using a ViewResolver
which may for example match it to an HTML template. Furthermore a View
may render based on multiple attributes contained in the model.
A View can also choose to select an attribute from the model use
any existing Encoder to render alternate media types.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | BINDING_CONTEXT_ATTRIBUTE
The name of the exchange attribute that contains the
|
| Modifier and Type | Method and Description |
|---|---|
| public default List | |
| public default boolean | |
| public Mono | Returns: Mono to represent when and if rendering succeedsa Map with name Strings as keys and corresponding model
objects as values (Map can also be model, MediaType null in case of empty model)the content type selected to render with which should
match one of the contentType, ServerWebExchange supported media types.the current exchange exchange)Render the view based on the given |
| BINDING_CONTEXT_ATTRIBUTE | back to summary |
|---|---|
| public static final String BINDING_CONTEXT_ATTRIBUTE The name of the exchange attribute that contains the
Note This attribute is not required and may not be present.
| |
| getSupportedMediaTypes | back to summary |
|---|---|
| public default List Return the list of media types this View supports, or an empty list. | |
| isRedirectView | back to summary |
|---|---|
| public default boolean isRedirectView() Whether this View does render by performing a redirect. | |
| render | back to summary |
|---|---|
| public Mono Render the view based on the given
| |