Update docs

This commit is contained in:
Janne Valkealahti
2023-10-06 17:07:16 +01:00
parent 2819c1d367
commit 6f7eac435a
11 changed files with 18 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
[[using-shell-components-ui-confirmation]]
= Confirmation
ifndef::snippets[:snippets: ../../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 image shows the typical output from a confirmation component:
image::component-confirmation-1.svg[text input]
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]).
|===