| 
         This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 3.4.1!  | 
    
Confirmation
The confirmation component asks a user for a simple confirmation. It is essentially a yes-or-no question.
@Command
public class ComponentCommands extends AbstractShellComponent {
	@Command(command = "component confirmation", description = "Confirmation input", group = "Components")
	public String confirmationInput(boolean no) {
		ConfirmationInput component = new ConfirmationInput(getTerminal(), "Enter value", !no);
		component.setResourceLoader(getResourceLoader());
		component.setTemplateExecutor(getTemplateExecutor());
		ConfirmationInputContext context = component.run(ConfirmationInputContext.empty());
		return "Got value " + context.getResultValue();
	}
}
The following screencast shows the typical output from a confirmation component:
The context object is ConfirmationInputContext. The following table describes its context variables:
| Key | Description | 
|---|---|
  | 
The default value — either   | 
  | 
The parent context variables (see TextComponentContext Template Variables).  |