Skip to content

Commit

Permalink
btp compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev committed Mar 8, 2024
1 parent b4d5a11 commit 08accc0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 18 deletions.
16 changes: 15 additions & 1 deletion src/z2ui5_cl_demo_app_000.clas.abap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CLASS z2ui5_cl_demo_app_000 DEFINITION PUBLIC.
CLASS z2ui5_cl_demo_app_000 DEFINITION PUBLIC.

PUBLIC SECTION.

Expand Down Expand Up @@ -856,6 +856,20 @@ class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
).

panel = page->panel(
expandable = abap_false
expanded = abap_true
headertext = `Launchpad Integration`
).

panel->generic_tile(
header = 'Camera & Picture'
subheader = `App Navigation & Parameters`
press = client->_event( 'z2ui5_cl_demo_app_127' )
mode = 'LineMode'
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
).

page = page2->panel(
expandable = abap_true
expanded = client->_bind_edit( ms_check_expanded-extensions )
Expand Down
28 changes: 17 additions & 11 deletions src/z2ui5_cl_demo_app_127.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ CLASS z2ui5_cl_demo_app_127 DEFINITION PUBLIC.

INTERFACES z2ui5_if_app.

DATA product TYPE string.
DATA quantity TYPE string.
* DATA product TYPE string.
* DATA quantity TYPE string.
DATA check_initialized TYPE abap_bool.

DATA:
BEGIN OF nav_params,
product TYPE string,
quantity TYPE string,
END OF nav_params.

PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
Expand All @@ -19,13 +25,12 @@ CLASS z2ui5_cl_demo_app_127 IMPLEMENTATION.

METHOD z2ui5_if_app~main.

data(lt_startup_params) = client->get( )-s_config-t_startup_params.
DATA(lt_startup_params) = client->get( )-s_config-t_startup_params.

IF check_initialized = abap_false.
check_initialized = abap_true.

product = 'tomato'.
quantity = '500'.
nav_params-product = '102343333'.

DATA(view) = z2ui5_cl_xml_view=>factory( ).
client->view_display( view->shell(
Expand All @@ -42,17 +47,18 @@ CLASS z2ui5_cl_demo_app_127 IMPLEMENTATION.
)->get_parent(
)->simple_form( title = 'App 127' editable = abap_true
)->content( 'form'
* )->title( 'Input'
* )->label( 'Product'
* )->input( client->_bind_edit( product )
* )->label( `Quantity`
* )->input( client->_bind_edit( quantity )
)->label( `Product`
)->input( client->_bind_edit( nav_params-product )
)->button( text = 'BACK' press = client->_event_client( client->cs_event-cross_app_nav_to_prev_app )
)->button(
text = 'go to app 128'
press = client->_event_client(
val = client->cs_event-cross_app_nav_to_ext
t_arg = VALUE #( ( `{ semanticObject: "Z2UI5_CL_DEMO_APP_128", action: "Z2UI5_CL_DEMO_APP_128" }` ) )
t_arg = VALUE #(
( `{ semanticObject: "Z2UI5_CL_DEMO_APP_128", action: "Z2UI5_CL_DEMO_APP_128" }` )
* ( `{ "Product" : "102343333" }` )
( `$` && client->_bind_edit( nav_params ) )
)
)
)->stringify( ) ).

Expand Down
12 changes: 6 additions & 6 deletions src/z2ui5_cl_demo_app_128.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ CLASS z2ui5_cl_demo_app_128 IMPLEMENTATION.
url = client->get( )-s_config-search ).
check_launchpad_active = client->get( )-check_launchpad_active.

data(lt_params) = client->get( )-t_comp_params.

Check failure on line 30 in src/z2ui5_cl_demo_app_128.clas.abap

View check run for this annotation

abaplint / abaplint

Component "t_comp_params" not found in structure

https://rules.abaplint.org/check_syntax

Check failure on line 30 in src/z2ui5_cl_demo_app_128.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Component "t_comp_params" not found in structure

https://rules.abaplint.org/check_syntax
try.
product = lt_params[ n = `PRODUCT` ]-v.

Check failure on line 32 in src/z2ui5_cl_demo_app_128.clas.abap

View check run for this annotation

abaplint / abaplint

"lt_params" not found, findTop

https://rules.abaplint.org/check_syntax

Check failure on line 32 in src/z2ui5_cl_demo_app_128.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

"lt_params" not found, findTop

https://rules.abaplint.org/check_syntax
catch cx_root.
endtry.
IF check_initialized = abap_false.
check_initialized = abap_true.

product = 'tomato'.
quantity = '500'.

client->view_display( view->shell(
Expand All @@ -48,12 +52,8 @@ CLASS z2ui5_cl_demo_app_128 IMPLEMENTATION.
)->simple_form( title = 'App 128' editable = abap_true
)->content( 'form'
)->title( 'Input'
)->label( 'product'
)->label( 'product nav param'
)->input( client->_bind_edit( product )
)->label( `quantity`
)->input( client->_bind_edit( quantity )
)->label( `url param product`
)->input( product_url
)->label( `CHECK_LAUNCHPAD_ACTIVE`
)->input( check_launchpad_active
)->button( press = client->_event( )
Expand Down

0 comments on commit 08accc0

Please sign in to comment.