Skip to content

Commit 7a636b6

Browse files
authored
Update events.md
1 parent cec06b8 commit 7a636b6

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

docs/development/events.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ If an UI5 property is an event, just import the result of the method `client->_e
1313
METHOD z2ui5_if_app~main.
1414
1515
client->view_display( z2ui5_cl_xml_view=>factory(
16-
)->button( text = 'post' press = client->_event( 'BUTTON_POST' )
17-
)->stringify( ) ).
18-
19-
CASE client->get( )-event.
16+
)->button(
17+
text = 'post'
18+
press = client->_event( 'BUTTON_POST' )
19+
)->stringify( ) ).
2020
21-
WHEN 'BUTTON_POST'.
22-
client->message_box_display( |Your name is { name }| ).
23-
24-
WHEN OTHERS.
25-
ENDCASE.
21+
CASE client->get( )-event.
22+
WHEN 'BUTTON_POST'.
23+
client->message_box_display( |Your name is { name }| ).
24+
ENDCASE.
2625
2726
ENDMETHOD.
2827
```
@@ -37,14 +36,11 @@ METHOD z2ui5_if_app~main.
3736
client->view_display( z2ui5_cl_xml_view=>factory(
3837
)->button( text = `post` press = client->_event( val = `BUTTON_POST`
3938
t_arg = VALUE #( ( `${$source>/text}` ) ) )
40-
)->stringify( ) ).
39+
)->stringify( ) ).
4140
4241
CASE client->get( )-event.
43-
4442
WHEN 'BUTTON_POST'.
4543
client->message_box_display( |The button text is { client->get_event_arg( 1 ) }| ).
46-
47-
WHEN OTHERS.
4844
ENDCASE.
4945
5046
ENDMETHOD.
@@ -58,13 +54,11 @@ METHOD z2ui5_if_app~main.
5854
client->view_display( z2ui5_cl_xml_view=>factory(
5955
)->button( text = `post` press = client->_event( val = `BUTTON_POST`
6056
t_arg = VALUE #( ( `${$source>/text}` ) ) )
61-
)->stringify( ) ).
57+
)->stringify( ) ).
6258
6359
CASE client->get( )-event.
64-
6560
WHEN 'BUTTON_POST'.
6661
client->message_box_display( |The button text is { client->get_event_arg( 1 ) }| ).
67-
6862
WHEN OTHERS.
6963
ENDCASE.
7064
@@ -79,13 +73,11 @@ METHOD z2ui5_if_app~main.
7973
client->view_display( z2ui5_cl_xml_view=>factory(
8074
)->button( text = `post` press = client->_event( val = `BUTTON_POST`
8175
t_arg = VALUE #( ( `${$source>/text}` ) ) )
82-
)->stringify( ) ).
76+
)->stringify( ) ).
8377
8478
CASE client->get( )-event.
85-
8679
WHEN 'BUTTON_POST'.
8780
client->message_box_display( |The button text is { client->get_event_arg( 1 ) }| ).
88-
8981
WHEN OTHERS.
9082
ENDCASE.
9183
@@ -101,14 +93,11 @@ METHOD z2ui5_if_app~main.
10193
)->button( text = `post` press = client->_event(
10294
val = `BUTTON_POST`
10395
t_arg = VALUE #( ( `${$source>/text}` ) ) )
104-
)->stringify( ) ).
96+
)->stringify( ) ).
10597
10698
CASE client->get( )-event.
107-
10899
WHEN 'BUTTON_POST'.
109100
client->message_box_display( |The button text is { client->get_event_arg( 1 ) }| ).
110-
111-
WHEN OTHERS.
112101
ENDCASE.
113102
114103
ENDMETHOD.
@@ -141,10 +130,12 @@ The following frontend events re availibkle:
141130
METHOD z2ui5_if_app~main.
142131
143132
client->view_display( z2ui5_cl_xml_view=>factory(
144-
)->button( text = `post` press = client->_event( client->_event_client(
145-
val = client->cs_event-open_new_tab
146-
t_arg = VALUE #( ( `https://github.com/abap2UI5` ) ) ) )
147-
)->stringify( ) ).
133+
)->button(
134+
text = `post`
135+
press = client->_event( client->_event_client(
136+
val = client->cs_event-open_new_tab
137+
t_arg = VALUE #( ( `https://github.com/abap2UI5` ) ) ) )
138+
)->stringify( ) ).
148139
149140
ENDMETHOD.
150141
```
@@ -159,4 +150,4 @@ METHOD z2ui5_if_app~main.
159150
160151
ENDMETHOD.
161152
```
162-
Check out sample `Z2UI5_CL_DEMO_APP_180` for a working snippet.
153+
Check out sample `Z2UI5_CL_DEMO_APP_180` for a working snippet.

0 commit comments

Comments
 (0)