Skip to content

Commit 4cf8013

Browse files
authored
Update share.md
1 parent a70989a commit 4cf8013

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

docs/development/navigation/share.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The app state feature leads to various additional use cases.
44

55
### 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:
77
```abap
88
CLASS z2ui5_cl_sample_share DEFINITION PUBLIC FINAL CREATE PUBLIC.
99
@@ -15,20 +15,16 @@ ENDCLASS.
1515
1616
CLASS z2ui5_cl_sample_share IMPLEMENTATION.
1717
METHOD z2ui5_if_app~main.
18-
19-
IF client->check_on_navigated( ).
20-
DATA(view) = z2ui5_cl_xml_view=>factory( ).
21-
client->view_display( view->shell(
22-
)->label( `quantity`
23-
)->input( client->_bind_edit( mv_quantity )
24-
)->button(
25-
text = `share`
26-
press = client->_event( `BUTTON_POST` )
27-
)->stringify( ) ).
28-
ENDIF.
29-
30-
CASE client->get( )-event.
31-
WHEN `BUTTON_POST`.
18+
CASE abap_true.
19+
20+
WHEN client->check_on_navigated( ).
21+
DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( )->page(
22+
)->label( `quantity`
23+
)->input( client->_bind_edit( mv_quantity )
24+
)->button( text = `share` press = client->_event( `BUTTON_POST` ) ).
25+
client->view_display( view->stringify( ) ).
26+
27+
WHEN client->check_on_event( `BUTTON_POST` ).
3228
client->follow_up_action( client->_event_client( z2ui5_if_client=>cs_event-CLIPBOARD_APP_STATE ) ).
3329
client->message_toast_display( `clipboard copied` ).
3430

0 commit comments

Comments
 (0)