Skip to content

Commit fc480dc

Browse files
authored
Update general.md
1 parent 79b323a commit fc480dc

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

docs/development/general.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# General
1+
# Controller
22

33
abap2UI5 offers great flexibility in app development. Most sample applications follow a process similar to the sequence outlined below. You can use it as a starting point, but feel free to create your own sequence or build a wrapper on top of abap2UI5 for more customized behavior:
44

@@ -12,33 +12,30 @@ ENDCLASS.
1212
1313
CLASS z2ui5_cl_app IMPLEMENTATION.
1414
METHOD z2ui5_if_app~main.
15-
TRY.
15+
CASE abap_true.
1616
17-
CASE abap_true.
18-
19-
WHEN client->check_on_init( ).
20-
"...
17+
"first start, init your app here...
18+
WHEN client->check_on_init( ).
2119
22-
WHEN client->check_on_navigated( ).
23-
DATA(lo_app_prev) = client->get_app_prev( ).
24-
"...
20+
"after coming back from another app
21+
WHEN client->check_on_navigated( ).
22+
"read the previous app
23+
DATA(lo_app_prev) = client->get_app_prev( ).
2524
26-
WHEN client->check_on_event( ).
27-
DATA(lt_arg) = client->get_event_arg( ).
25+
after user event
26+
WHEN client->check_on_event( ).
27+
"read event information
28+
DATA(lt_arg) = client->get_event_arg( ).
2829
29-
CASE abap_true.
30-
WHEN client->check_on_event( `OK` ).
31-
"...
30+
"handle event
31+
CASE abap_true.
32+
WHEN client->check_on_event( `OK` ).
3233
33-
WHEN client->check_on_event( `CANCEL` ).
34-
"...
34+
WHEN client->check_on_event( `CANCEL` ).
3535
36-
ENDCASE.
3736
ENDCASE.
3837
39-
CATCH cx_root INTO DATA(lx).
40-
client->message_box_display( lx ).
41-
ENDTRY.
38+
ENDCASE.
4239
ENDMETHOD.
4340
ENDCLASS.
4441
````

0 commit comments

Comments
 (0)