You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/get_started/hello_world.md
+2-9Lines changed: 2 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,8 @@ Head back to the landing page in your browser and enter `Z2UI5_CL_APP_HELLO_WORL
27
27
Now, let's add our first view to display a simple text:
28
28
```abap
29
29
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
30
-
31
30
PUBLIC SECTION.
32
31
INTERFACES z2ui5_if_app.
33
-
34
32
ENDCLASS.
35
33
36
34
CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
@@ -49,15 +47,13 @@ ENDCLASS.
49
47
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:
50
48
```abap
51
49
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
52
-
53
50
PUBLIC SECTION.
54
51
INTERFACES z2ui5_if_app.
55
-
DATA name TYPE string.
56
-
57
52
ENDCLASS.
58
53
59
54
CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
60
55
METHOD z2ui5_if_app~main.
56
+
61
57
CASE abap_true.
62
58
63
59
WHEN client->check_on_init( ).
@@ -73,6 +69,7 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
73
69
client->message_box_display( `Hello World!` ).
74
70
75
71
ENDCASE.
72
+
76
73
ENDMETHOD.
77
74
ENDCLASS.
78
75
```
@@ -81,15 +78,12 @@ ENDCLASS.
81
78
Finally, we add a public attribute and can send data to the backend:
82
79
```abap
83
80
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
84
-
85
81
PUBLIC SECTION.
86
82
INTERFACES z2ui5_if_app.
87
83
DATA name TYPE string.
88
-
89
84
ENDCLASS.
90
85
91
86
CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
92
-
93
87
METHOD z2ui5_if_app~main.
94
88
95
89
CASE abap_true.
@@ -112,7 +106,6 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
112
106
ENDCASE.
113
107
114
108
ENDMETHOD.
115
-
116
109
ENDCLASS.
117
110
```
118
111
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