Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev committed Feb 20, 2024
1 parent 5d89b27 commit bc45c04
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 20 deletions.
3 changes: 2 additions & 1 deletion src/z2ui5_cl_demo_app_001.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ CLASS Z2UI5_CL_DEMO_APP_001 IMPLEMENTATION.
client->message_toast_display( |{ product } { quantity } - send to the server| ).

WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
client->nav_app_leave( ).

Check failure on line 60 in src/z2ui5_cl_demo_app_001.clas.abap

View check run for this annotation

abaplint / abaplint

Parameter "app" must be supplied

https://rules.abaplint.org/check_syntax

Check failure on line 60 in src/z2ui5_cl_demo_app_001.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Parameter "app" must be supplied

https://rules.abaplint.org/check_syntax
* client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).

ENDCASE.

Expand Down
60 changes: 42 additions & 18 deletions src/z2ui5_cl_demo_app_006.clas.abap
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
CLASS Z2UI5_CL_DEMO_APP_006 DEFINITION PUBLIC.
CLASS z2ui5_cl_demo_app_006 DEFINITION PUBLIC.

PUBLIC SECTION.

INTERFACES Z2UI5_if_app.
INTERFACES z2ui5_if_app.

TYPES:
BEGIN OF ty_row,
count TYPE i,
value TYPE string,
descr TYPE string,
icon TYPE string,
info TYPE string,
checkbox TYPE abap_bool,
count TYPE i,
value TYPE string,
descr TYPE string,
icon TYPE string,
info TYPE string,
checkbox TYPE abap_bool,
percentage(5) TYPE p DECIMALS 2,
valueColor TYPE string,
valuecolor TYPE string,
END OF ty_row.

DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY.
DATA check_initialized TYPE abap_bool.
DATA check_ui5 TYPE abap_bool.
DATA mv_key TYPE string.
METHODS refresh_data.

Expand All @@ -27,7 +28,7 @@ ENDCLASS.



CLASS Z2UI5_CL_DEMO_APP_006 IMPLEMENTATION.
CLASS z2ui5_cl_demo_app_006 IMPLEMENTATION.


METHOD refresh_data.
Expand All @@ -45,9 +46,31 @@ CLASS Z2UI5_CL_DEMO_APP_006 IMPLEMENTATION.
ENDMETHOD.


METHOD Z2UI5_if_app~main.

METHOD z2ui5_if_app~main.
data(lo_app2) = client->get_app( client->get( )-s_draft-id_prev_app_stack ) .
IF check_initialized = abap_false.

IF check_ui5 = abap_false.
check_ui5 = abap_true.
client->nav_app_call( z2ui5_cl_popup_js_loader=>factory_check_open_ui5( ) ).

Check failure on line 55 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint

Method "factory_check_open_ui5" not found, methodCallChain

https://rules.abaplint.org/check_syntax

Check failure on line 55 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Method "factory_check_open_ui5" not found, methodCallChain

https://rules.abaplint.org/check_syntax
RETURN.
ENDIF.

IF client->get( )-check_on_navigated = abap_true.
TRY.
DATA(lo_app) = CAST z2ui5_cl_popup_js_loader( client->get_app( client->get( )-s_draft-id_prev_app ) ).
IF lo_app->mv_is_open_ui5 = abap_true.

Check failure on line 62 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint

Attribute or constant "mv_is_open_ui5" not found in "z2ui5_cl_popup_js_loader"

https://rules.abaplint.org/check_syntax

Check failure on line 62 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Attribute or constant "mv_is_open_ui5" not found in "z2ui5_cl_popup_js_loader"

https://rules.abaplint.org/check_syntax
client->nav_app_call( z2ui5_cl_popup_to_inform=>factory(
`Sample not supported with OpenUI5, switch bootstrapping first to see this demo` ) ).
RETURN.
ENDIF.
CATCH cx_root.
CAST z2ui5_cl_popup_to_inform( client->get_app( client->get( )-s_draft-id_prev_app ) ).
client->nav_app_leave( ).

Check failure on line 69 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint

Parameter "app" must be supplied

https://rules.abaplint.org/check_syntax

Check failure on line 69 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Parameter "app" must be supplied

https://rules.abaplint.org/check_syntax
RETURN.
ENDTRY.
ENDIF.

check_initialized = abap_true.
refresh_data( ).
ENDIF.
Expand All @@ -68,18 +91,19 @@ CLASS Z2UI5_CL_DEMO_APP_006 IMPLEMENTATION.
WHEN 'MENU_DEFAULT'.
client->message_box_display( 'menu default pressed' ).

WHEN 'MENU_01'.
WHEN 'MENU_01'.
client->message_box_display( 'menu 01 pressed' ).

WHEN 'MENU_02'.
WHEN 'MENU_02'.
client->message_box_display( 'menu 02 pressed' ).

WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
client->nav_app_leave( ).

Check failure on line 101 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint

Parameter "app" must be supplied

https://rules.abaplint.org/check_syntax

Check failure on line 101 in src/z2ui5_cl_demo_app_006.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Parameter "app" must be supplied

https://rules.abaplint.org/check_syntax
* client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).

ENDCASE.

data(view) = z2ui5_cl_xml_view=>factory( ).
DATA(view) = z2ui5_cl_xml_view=>factory( ).
DATA(page) = view->shell(
)->page(
title = 'abap2UI5 - Scroll Container with Table and Toolbar'
Expand Down Expand Up @@ -144,7 +168,7 @@ CLASS Z2UI5_CL_DEMO_APP_006 IMPLEMENTATION.
tooltip = `Export`
defaultaction = client->_event( 'MENU_DEFAULT' )
icon = `sap-icon://share`
buttonMode = `Split`
buttonmode = `Split`
)->_generic( `menu` )->_generic( `Menu`
)->menu_item(
press = client->_event( 'MENU_01' )
Expand Down Expand Up @@ -176,7 +200,7 @@ CLASS Z2UI5_CL_DEMO_APP_006 IMPLEMENTATION.
)->text( '{DESCR}'
)->checkbox( selected = '{CHECKBOX}' enabled = abap_false
)->text( '{COUNT}'
)->radial_micro_chart( size = `Responsive` height = `35px` percentage = `{PERCENTAGE}` valueColor = `{VALUECOLOR}` ).
)->radial_micro_chart( size = `Responsive` height = `35px` percentage = `{PERCENTAGE}` valuecolor = `{VALUECOLOR}` ).

client->view_display( view->stringify( ) ).

Expand Down
2 changes: 1 addition & 1 deletion src/z2ui5_cl_demo_app_174.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,4 @@ CLASS z2ui5_cl_demo_app_174 IMPLEMENTATION.

ENDMETHOD.

ENDCLASS.
ENDCLASS.

0 comments on commit bc45c04

Please sign in to comment.