Skip to content

Commit 08accc0

Browse files
committed
btp compatibility
1 parent b4d5a11 commit 08accc0

File tree

3 files changed

+38
-18
lines changed

3 files changed

+38
-18
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CLASS z2ui5_cl_demo_app_000 DEFINITION PUBLIC.
1+
CLASS z2ui5_cl_demo_app_000 DEFINITION PUBLIC.
22

33
PUBLIC SECTION.
44

@@ -856,6 +856,20 @@ class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
856856
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
857857
).
858858

859+
panel = page->panel(
860+
expandable = abap_false
861+
expanded = abap_true
862+
headertext = `Launchpad Integration`
863+
).
864+
865+
panel->generic_tile(
866+
header = 'Camera & Picture'
867+
subheader = `App Navigation & Parameters`
868+
press = client->_event( 'z2ui5_cl_demo_app_127' )
869+
mode = 'LineMode'
870+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
871+
).
872+
859873
page = page2->panel(
860874
expandable = abap_true
861875
expanded = client->_bind_edit( ms_check_expanded-extensions )

src/z2ui5_cl_demo_app_127.clas.abap

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ CLASS z2ui5_cl_demo_app_127 DEFINITION PUBLIC.
44

55
INTERFACES z2ui5_if_app.
66

7-
DATA product TYPE string.
8-
DATA quantity TYPE string.
7+
* DATA product TYPE string.
8+
* DATA quantity TYPE string.
99
DATA check_initialized TYPE abap_bool.
1010

11+
DATA:
12+
BEGIN OF nav_params,
13+
product TYPE string,
14+
quantity TYPE string,
15+
END OF nav_params.
16+
1117
PROTECTED SECTION.
1218
PRIVATE SECTION.
1319
ENDCLASS.
@@ -19,13 +25,12 @@ CLASS z2ui5_cl_demo_app_127 IMPLEMENTATION.
1925

2026
METHOD z2ui5_if_app~main.
2127

22-
data(lt_startup_params) = client->get( )-s_config-t_startup_params.
28+
DATA(lt_startup_params) = client->get( )-s_config-t_startup_params.
2329

2430
IF check_initialized = abap_false.
2531
check_initialized = abap_true.
2632

27-
product = 'tomato'.
28-
quantity = '500'.
33+
nav_params-product = '102343333'.
2934

3035
DATA(view) = z2ui5_cl_xml_view=>factory( ).
3136
client->view_display( view->shell(
@@ -42,17 +47,18 @@ CLASS z2ui5_cl_demo_app_127 IMPLEMENTATION.
4247
)->get_parent(
4348
)->simple_form( title = 'App 127' editable = abap_true
4449
)->content( 'form'
45-
* )->title( 'Input'
46-
* )->label( 'Product'
47-
* )->input( client->_bind_edit( product )
48-
* )->label( `Quantity`
49-
* )->input( client->_bind_edit( quantity )
50+
)->label( `Product`
51+
)->input( client->_bind_edit( nav_params-product )
5052
)->button( text = 'BACK' press = client->_event_client( client->cs_event-cross_app_nav_to_prev_app )
5153
)->button(
5254
text = 'go to app 128'
5355
press = client->_event_client(
5456
val = client->cs_event-cross_app_nav_to_ext
55-
t_arg = VALUE #( ( `{ semanticObject: "Z2UI5_CL_DEMO_APP_128", action: "Z2UI5_CL_DEMO_APP_128" }` ) )
57+
t_arg = VALUE #(
58+
( `{ semanticObject: "Z2UI5_CL_DEMO_APP_128", action: "Z2UI5_CL_DEMO_APP_128" }` )
59+
* ( `{ "Product" : "102343333" }` )
60+
( `$` && client->_bind_edit( nav_params ) )
61+
)
5662
)
5763
)->stringify( ) ).
5864

src/z2ui5_cl_demo_app_128.clas.abap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ CLASS z2ui5_cl_demo_app_128 IMPLEMENTATION.
2727
url = client->get( )-s_config-search ).
2828
check_launchpad_active = client->get( )-check_launchpad_active.
2929

30+
data(lt_params) = client->get( )-t_comp_params.
31+
try.
32+
product = lt_params[ n = `PRODUCT` ]-v.
33+
catch cx_root.
34+
endtry.
3035
IF check_initialized = abap_false.
3136
check_initialized = abap_true.
3237

33-
product = 'tomato'.
3438
quantity = '500'.
3539

3640
client->view_display( view->shell(
@@ -48,12 +52,8 @@ CLASS z2ui5_cl_demo_app_128 IMPLEMENTATION.
4852
)->simple_form( title = 'App 128' editable = abap_true
4953
)->content( 'form'
5054
)->title( 'Input'
51-
)->label( 'product'
55+
)->label( 'product nav param'
5256
)->input( client->_bind_edit( product )
53-
)->label( `quantity`
54-
)->input( client->_bind_edit( quantity )
55-
)->label( `url param product`
56-
)->input( product_url
5757
)->label( `CHECK_LAUNCHPAD_ACTIVE`
5858
)->input( check_launchpad_active
5959
)->button( press = client->_event( )

0 commit comments

Comments
 (0)