Package io.micronaut.views.jte
Class JteViewsRenderer<T,R>
java.lang.Object
io.micronaut.views.jte.JteViewsRenderer<T,R>
- Type Parameters:
T
- type of input model.R
- type of request.
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,ViewsRenderer<T,
R>
- Direct Known Subclasses:
HtmlJteViewsRenderer
,PlainJteViewsRenderer
View renderer using JTE.
- Since:
- 3.1.0
- Author:
- edward3h
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ModifierConstructorDescriptionprotected
JteViewsRenderer
(ViewsConfiguration viewsConfiguration, JteViewsRendererConfiguration jteViewsRendererConfiguration, gg.jte.ContentType contentType, Path classDirectory) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Constructor Details
-
JteViewsRenderer
protected JteViewsRenderer(ViewsConfiguration viewsConfiguration, JteViewsRendererConfiguration jteViewsRendererConfiguration, gg.jte.ContentType contentType, Path classDirectory) - Parameters:
viewsConfiguration
- Views configurationjteViewsRendererConfiguration
- JTE specific configurationcontentType
- JTE content type of this rendererclassDirectory
- When using dynamic templates, where to generate source and class files
-
-
Method Details
-
render
@NonNull public @NonNull io.micronaut.core.io.Writable render(@NonNull @NonNull String viewName, @Nullable T data, @Nullable R request) - Specified by:
render
in interfaceViewsRenderer<T,
R> - Parameters:
viewName
- view name to be rendereddata
- response body to render it with a viewrequest
- HTTP request- Returns:
- A writable where the view will be written to.
-
exists
- Specified by:
exists
in interfaceViewsRenderer<T,
R> - Parameters:
viewName
- view name to be rendered- Returns:
- true if a template can be found for the supplied view name.
-