Class TemplatedBuilder<T extends Renderable, SELF extends TemplatedBuilder<T,SELF>>
java.lang.Object
io.micronaut.views.TemplatedBuilder<T,SELF>
- Type Parameters:
T- The class to be builtSELF- The builder itself (so that it can be chained)
- Direct Known Subclasses:
TurboFrame.Builder
public abstract class TemplatedBuilder<T extends Renderable, SELF extends TemplatedBuilder<T,SELF>>
extends Object
Abstract class to be used by builders which support templates.
- Since:
- 3.4.0
- Author:
- Sergio del Amo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Tbuild()@Nullable Object@NonNull SELFtemplate(@NonNull io.micronaut.core.io.Writable writable) Sets the Turbo frame content with aWritable.@NonNull SELFtemplate(@NonNull CharSequence html) Sets the Turbo Frame with a String.@NonNull SELFSets the template with a View and Model.@NonNull SELFtemplateModel(@NonNull Object templateModel) Sets the template's model.@NonNull SELFtemplateView(@NonNull String templateView) Sets the template's view name.
-
Constructor Details
-
TemplatedBuilder
public TemplatedBuilder()
-
-
Method Details
-
build
- Returns:
- Build instance
-
getTemplateView
-
getTemplateModel
-
getTemplate
- Returns:
- The Template
-
template
-
template
Sets the Turbo Frame with a String. E.g. HTML.- Parameters:
html- The turbo frame content- Returns:
- The Builder
-
template
Sets the Turbo frame content with aWritable.- Parameters:
writable- The template as aWritable.- Returns:
- The Builder
-
templateView
-
templateModel
-