Files
Mahmoud Ben Hassine e3cb93791d Update documentation
2025-04-25 10:13:56 +02:00

25 lines
881 B
Plaintext

[#appendix-tui-catalog]
= Catalog App
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
Catalog application shows various ways how the Terminal UI Framework can be used.
In this section, we discuss how this application works. It can be considered as
a reference application as it's using most of the features available and tries
to follow the best practices.
[[create-scenario]]
== Create Scenario
Every `Scenario` essentially is a sample code of a `View` as that's what catalog
app demonstrates. In the sample app create a new scenario class under
_scenario_ package and implement it as something shown below.
[source, java, indent=0]
----
include::{snippets}/CatalogSnippets.java[tag=samplescenario]
----
NOTE: You need to define all fields, `name`, `description` and `category`
with _@ScenarioComponent_.