Skip to content

Commit

Permalink
Use Span in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
knstvk committed Jul 16, 2023
1 parent a07fd0b commit e79d507
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions content/modules/tutorial/pages/ui-from-scratch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,17 @@ image::ui-from-scratch/gen-column-1.png[align="center"]

The data grid is almost ready, now let's add the labels displaying counters of total, completed and overdue steps.

Click *Add Component* in the actions panel and drag and drop `Layouts` -> `VBox` (vertical box) to the `layout` element of the *Jmix UI* hierarchy panel before `userStepsDataGrid`. Then add three `HTML` -> `Label` components into `vbox`.
Click *Add Component* in the actions panel and drag and drop `Layouts` -> `VBox` (vertical box) to the `layout` element of the *Jmix UI* hierarchy panel before `userStepsDataGrid`. Then add three `HTML` -> `Span` components into `vbox`.

Set the label identifiers as below:

[source,xml]
----
<layout>
<vbox>
<label id="totalStepsLabel"/>
<label id="completedStepsLabel"/>
<label id="overdueStepsLabel"/>
<span id="totalStepsLabel"/>
<span id="completedStepsLabel"/>
<span id="overdueStepsLabel"/>
</vbox>
----

Expand All @@ -284,13 +284,13 @@ Now you need to calculate and set their values programmatically in the controlle
[source,java]
----
@ViewComponent
private Label completedStepsLabel;
private Span completedStepsLabel;
@ViewComponent
private Label overdueStepsLabel;
private Span overdueStepsLabel;
@ViewComponent
private Label totalStepsLabel;
private Span totalStepsLabel;
@ViewComponent
private CollectionContainer<UserStep> userStepsDc;
Expand Down

0 comments on commit e79d507

Please sign in to comment.