Package io.micronaut.views
Class TemplatedBuilder<T extends Renderable>
java.lang.Object
io.micronaut.views.TemplatedBuilder<T>
- Type Parameters:
 T- The class to be built
- Direct Known Subclasses:
 TurboFrame.Builder
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 TemplatedBuilder<T>template(@NonNull io.micronaut.core.io.Writable writable) Sets the Turbo frame content with aWritable.@NonNull TemplatedBuilder<T>Sets the Turbo Frame with a String.@NonNull TemplatedBuilder<T>Sets the template with a View and Model.@NonNull TemplatedBuilder<T>templateModel(@NonNull Object templateModel) Sets the template's model.@NonNull TemplatedBuilder<T>templateView(@NonNull String templateView) Sets the template's view name. 
- 
Constructor Details
- 
TemplatedBuilder
public TemplatedBuilder() 
 - 
 - 
Method Details
- 
build
- Returns:
 - Build instance
 
 - 
getTemplateView
- Returns:
 - The TurboStream template view name.
 
 - 
getTemplateModel
- Returns:
 - The TurboStream template model.
 
 - 
getTemplate
- Returns:
 - The Template
 
 - 
template
Sets the template with a View and Model.- Parameters:
 view- The View namemodel- The Model- Returns:
 - The Builder
 
 - 
template
Sets the Turbo Frame with a String. E.g. HTML.- Parameters:
 html- The turbo frame content- Returns:
 - The Builder
 
 - 
template
@NonNull public @NonNull TemplatedBuilder<T> template(@NonNull @NonNull io.micronaut.core.io.Writable writable) Sets the Turbo frame content with aWritable.- Parameters:
 writable- The template as aWritable.- Returns:
 - The Builder
 
 - 
templateView
Sets the template's view name.- Parameters:
 templateView- The View name- Returns:
 - The Builder
 
 - 
templateModel
Sets the template's model.- Parameters:
 templateModel- template model.- Returns:
 - The Builder
 
 
 -