title and timer (#674)

This commit is contained in:
oblomov 2023-11-25 15:15:48 +01:00 committed by GitHub
parent 5b9fa8a1db
commit 2bd0448c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 16 deletions

View File

@ -52,7 +52,7 @@ CLASS z2ui5_cl_fw_client IMPLEMENTATION.
event = mo_handler->ms_actual-event
check_launchpad_active = mo_handler->ms_actual-check_launchpad_active
t_event_arg = mo_handler->ms_actual-t_event_arg
* t_scroll_pos = mo_handler->ms_actual-t_scroll_pos
t_scroll_pos = mo_handler->ms_actual-t_scroll_pos
t_message_manager = mo_handler->ms_actual-t_message_manager
s_draft = CORRESPONDING #( mo_handler->ms_db )
check_on_navigated = mo_handler->ms_actual-check_on_navigated
@ -103,6 +103,20 @@ CLASS z2ui5_cl_fw_client IMPLEMENTATION.
ENDMETHOD.
METHOD z2ui5_if_client~timer_set.
mo_handler->ms_next-s_set-s_timer-interval_ms = interval_ms.
mo_handler->ms_next-s_set-s_timer-event_finished = event_finished.
ENDMETHOD.
METHOD z2ui5_if_client~title_set.
mo_handler->ms_next-s_set-title = val.
ENDMETHOD.
METHOD z2ui5_if_client~nest_view_display.
mo_handler->ms_next-s_set-s_view_nest-xml = val.

View File

@ -65,7 +65,7 @@ CLASS z2ui5_cl_fw_handler DEFINITION
t_message TYPE z2ui5_if_client=>ty_t_message_manager,
check_clear TYPE abap_bool,
END OF s_message_manager,
* _viewmodel TYPE string,
_viewmodel TYPE string,
END OF ty_s_next2.
TYPES:
@ -277,15 +277,15 @@ CLASS z2ui5_cl_fw_handler IMPLEMENTATION.
CATCH cx_root.
ENDTRY.
* TRY.
* DATA(lo_scroll) = so_body->get_attribute( `OSCROLL` ).
* z2ui5_cl_fw_utility=>trans_ref_tab_2_tab(
* EXPORTING
* ir_tab_from = lo_scroll->mr_actual
* IMPORTING
* t_result = result->ms_actual-t_scroll_pos ).
* CATCH cx_root.
* ENDTRY.
TRY.
DATA(lo_scroll) = so_body->get_attribute( `OSCROLL` ).
z2ui5_cl_fw_utility=>trans_ref_tab_2_tab(
EXPORTING
ir_tab_from = lo_scroll->mr_actual
IMPORTING
t_result = result->ms_actual-t_scroll_pos ).
CATCH cx_root.
ENDTRY.
TRY.
DATA(lo_cursor) = so_body->get_attribute( `OCURSOR` ).

View File

@ -45,7 +45,7 @@ CLASS z2ui5_cl_cc_timer IMPLEMENTATION.
METHOD control.
result = mo_view.
mo_view->_generic( name = `CCTimer`
mo_view->_generic( name = `Timer`
ns = `z2ui5`
t_prop = VALUE #( ( n = `delayMS` v = delayms )
( n = `finished` v = finished )
@ -62,13 +62,13 @@ CLASS z2ui5_cl_cc_timer IMPLEMENTATION.
METHOD get_js.
result = ` jQuery.sap.declare("z2ui5.CCTimer");` && |\n| &&
result = ` jQuery.sap.declare("z2ui5.Timer");` && |\n| &&
`sap.ui.require([` && |\n| &&
` "sap/ui/core/Control"` && |\n| &&
`], (Control) => {` && |\n| &&
` "use strict";` && |\n| &&
|\n| &&
` return Control.extend("z2ui5.CCTimer", {` && |\n| &&
` return Control.extend("z2ui5.Timer", {` && |\n| &&
` metadata : {` && |\n| &&
` properties: {` && |\n| &&
` delayMS: {` && |\n| &&

View File

@ -96,6 +96,15 @@ INTERFACE z2ui5_if_client
METHODS view_model_update.
METHODS title_set
IMPORTING
val TYPE clike.
METHODS timer_set
IMPORTING
interval_ms TYPE clike OPTIONAL
event_finished TYPE clike.
METHODS nest_view_display
IMPORTING
val TYPE clike
@ -227,8 +236,8 @@ INTERFACE z2ui5_if_client
val TYPE data.
METHODS factory_view
IMPORTING
check_popup type abap_bool default abap_false
IMPORTING
check_popup TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_ui5.