Skip to content

Commit 2c4256c

Browse files
authored
Update setup.md
1 parent 250bcbe commit 2c4256c

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

docs/configuration/setup.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,53 @@ outline: [2, 4]
44

55
# General
66

7-
abap2UI5 can be run with various custom configurations. The default setup can be invoked using the following call.
7+
abap2UI5 can be run with various custom configurations. The default setup is used automatically. For custom configurations, simply implement the interface `z2ui5_if_exit`:
88

99
```abap
10-
METHOD if_http_extension~handle_request.
10+
CLASS zcl_a2ui5_user_exit DEFINITION PUBLIC FINAL CREATE PUBLIC.
1111
12-
z2ui5_cl_http_handler=>run( server ).
12+
PUBLIC SECTION.
13+
INTERFACES z2ui5_if_exit.
1314
14-
ENDMETHOD.
15+
ENDCLASS.
1516
```
16-
For custom configurations, simply populate the config structure and pass it to the run method:
1717

1818
### Theme
19-
For example, to change the theme, the source code would look like this:
19+
For example, to change the theme, the implementation would look like this:
2020
```abap
21-
METHOD if_http_extension~handle_request.
21+
METHOD z2ui5_if_exit~set_config_http_get.
2222
23-
z2ui5_cl_http_handler=>run( server = server config = VALUE #(
24-
theme = `sap_belize`
25-
) ).
23+
cs_config-theme = `sap_belize`.
2624
2725
ENDMETHOD.
28-
```
26+
```
2927

3028
### UI5 Bootstrapping
3129
To specify the source for bootstrapping UI5:
3230
```abap
33-
METHOD if_http_extension~handle_request.
31+
METHOD z2ui5_if_exit~set_config_http_get.
3432
35-
z2ui5_cl_http_handler=>run( server = server config = VALUE #(
36-
src = `https://ui5.sap.com/1.116.0/resources/sap-ui-core.js`
37-
) ).
33+
cs_config-src = `https://ui5.sap.com/1.116.0/resources/sap-ui-core.js`.
3834
3935
ENDMETHOD.
4036
```
4137

4238
### Title
4339
To set a custom title for the application:
4440
```abap
45-
METHOD if_http_extension~handle_request.
41+
METHOD z2ui5_if_exit~set_config_http_get.
4642
47-
z2ui5_cl_http_handler=>run( server = server config = VALUE #(
48-
title = `My Title`
49-
) ).
43+
cs_config-title = `my title`.
5044
5145
ENDMETHOD.
5246
```
5347

5448
### Style / CSS
5549
To apply custom styles or CSS, use the following:
5650
```abap
57-
METHOD if_http_extension~handle_request.
51+
METHOD z2ui5_if_exit~set_config_http_get.
5852
59-
z2ui5_cl_http_handler=>run( server = server config = VALUE #(
60-
styles_css = `<< style definiiton here>>`
61-
) ).
53+
cs_config-styles_css = `<<own css>>`.
6254
6355
ENDMETHOD.
6456
```

0 commit comments

Comments
 (0)