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/development/navigation/share.md
+14-15Lines changed: 14 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
The app state feature leads to various additional use cases.
4
4
5
5
### Share
6
-
You can easily intgerate a share button, which copies the actiual state into the clpiboard for sharing with your collegues. Check out the followig snippet:
6
+
You can easily integrate a share button, which copies the actiual state into the clpiboard for sharing with your collegues. Check out the followig snippet:
7
7
```abap
8
8
CLASS z2ui5_cl_sample_share DEFINITION PUBLIC FINAL CREATE PUBLIC.
Copy file name to clipboardExpand all lines: docs/get_started/hello_world.md
+32-26Lines changed: 32 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ ENDCLASS.
16
16
CLASS zcl_app_hello_world IMPLEMENTATION.
17
17
METHOD z2ui5_if_app~main.
18
18
19
-
client->message_box_display( |Hello World| ).
19
+
client->message_box_display( `Hello World` ).
20
20
21
21
ENDMETHOD.
22
22
ENDCLASS.
@@ -27,46 +27,47 @@ 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.
37
35
METHOD z2ui5_if_app~main.
38
36
39
-
client->view_display( z2ui5_cl_xml_view=>factory(
40
-
)->page( |abap2UI5 - Hello World|
41
-
)->text( |My Text| ) ).
37
+
DATA(view) = z2ui5_cl_xml_view=>factory(
38
+
)->page( `abap2UI5 - Hello World`
39
+
)->text( `My Text` ).
40
+
client->view_display( view->stringify( ) ).
42
41
43
42
ENDMETHOD.
44
43
ENDCLASS.
45
44
```
46
45
47
46
### Event Handler
48
-
Next, we extend the app with a button and an event:
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:
0 commit comments