Skip to content

Commit ba65d31

Browse files
authored
Update hello_world.md
1 parent 568260a commit ba65d31

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

docs/get_started/hello_world.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ Head back to the landing page in your browser and enter `Z2UI5_CL_APP_HELLO_WORL
2727
Now, let's add our first view to display a simple text:
2828
```abap
2929
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
30-
3130
PUBLIC SECTION.
3231
INTERFACES z2ui5_if_app.
33-
3432
ENDCLASS.
3533
3634
CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
@@ -49,15 +47,13 @@ ENDCLASS.
4947
Next, we extend the app with a button and an event handler. To ensure that the view is only rendered at the start, we also check for the `on_init` event:
5048
```abap
5149
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
52-
5350
PUBLIC SECTION.
5451
INTERFACES z2ui5_if_app.
55-
DATA name TYPE string.
56-
5752
ENDCLASS.
5853
5954
CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
6055
METHOD z2ui5_if_app~main.
56+
6157
CASE abap_true.
6258
6359
WHEN client->check_on_init( ).
@@ -73,6 +69,7 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
7369
client->message_box_display( `Hello World!` ).
7470
7571
ENDCASE.
72+
7673
ENDMETHOD.
7774
ENDCLASS.
7875
```
@@ -81,15 +78,12 @@ ENDCLASS.
8178
Finally, we add a public attribute and can send data to the backend:
8279
```abap
8380
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
84-
8581
PUBLIC SECTION.
8682
INTERFACES z2ui5_if_app.
8783
DATA name TYPE string.
88-
8984
ENDCLASS.
9085
9186
CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
92-
9387
METHOD z2ui5_if_app~main.
9488
9589
CASE abap_true.
@@ -112,7 +106,6 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
112106
ENDCASE.
113107
114108
ENDMETHOD.
115-
116109
ENDCLASS.
117110
```
118111
And that's it! Set a breakpoint to observe the communication and data updates in action. Now you can play around and experiment with modifying the view, events, and data exchange.

0 commit comments

Comments
 (0)