Files
spring-shell/spring-shell-docs/modules/ROOT/pages/components/ui/confirmation.adoc
Janne Valkealahti 860c8dcb93 Migrate docs shell samples to asciinema
- Update antora settings
- Move cast files and remove old ones
- Switch shell svg's to asciinema
- Fixes #884
2023-10-14 15:45:09 +01:00

34 lines
961 B
Plaintext

[[using-shell-components-ui-confirmation]]
= Confirmation
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The confirmation component asks a user for a simple confirmation. It is essentially a
yes-or-no question.
[source, java, indent=0]
----
include::{snippets}/UiComponentSnippets.java[tag=snippet5]
----
The following screencast shows the typical output from a confirmation component:
[asciinema,rows=8]
----
include::example$component-confirmation-1.cast[]
----
The context object is `ConfirmationInputContext`. The following table describes its context variables:
[[confirmationinputcontext-template-variables]]
.ConfirmationInputContext Template Variables
|===
|Key |Description
|`defaultValue`
|The default value -- either `true` or `false`.
|`model`
|The parent context variables (see xref:components/ui/render.adoc#textcomponentcontext-template-variables[TextComponentContext Template Variables]).
|===