Package io.micronaut.views.turbo
Class TurboStream
java.lang.Object
io.micronaut.views.turbo.TurboStream
- All Implemented Interfaces:
Renderable
Turbo Stream.
Streams.
- Since:
- 3.3.0
- Author:
- Sergio del Amo
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TurboStream.Builder
builder()
@NonNull TurboStreamAction
boolean
@NonNull Optional<io.micronaut.core.io.Writable>
render()
-
Method Details
-
getAction
- Returns:
- Turbo Stream Action.
-
getTargetDomId
- Returns:
- Target DOM ID.
-
getTargetCssQuerySelector
- Returns:
- Target CSS Selector
-
getRequestId
- Returns:
- request-id attribute, only relevant when action=refresh
-
getChildrenOnly
public boolean getChildrenOnly()- Returns:
- Morph only the children of the element designated by the target dom id.
-
getTemplate
- Returns:
- Template.
-
builder
- Returns:
- Creates a TurboStream Builder.
-
render
- Specified by:
render
in interfaceRenderable
- Returns:
- Renders a TurboStream as a
Writable
-