diff --git a/src/z2ui5_cl_demo_app_002.clas.abap b/src/z2ui5_cl_demo_app_002.clas.abap index 188bbfba..9ec256df 100644 --- a/src/z2ui5_cl_demo_app_002.clas.abap +++ b/src/z2ui5_cl_demo_app_002.clas.abap @@ -226,7 +226,7 @@ CLASS Z2UI5_CL_DEMO_APP_002 IMPLEMENTATION. )->get_parent( )->get_parent( ). lv_test->label( 'Segmented Button' - )->segmented_button( client->_bind_edit( screen-segment_key ) + )->segmented_button( selected_key = client->_bind_edit( screen-segment_key ) )->items( )->segmented_button_item( key = 'BLUE' diff --git a/src/z2ui5_cl_demo_app_026.clas.abap b/src/z2ui5_cl_demo_app_026.clas.abap index 9fb33c8a..dda2cc37 100644 --- a/src/z2ui5_cl_demo_app_026.clas.abap +++ b/src/z2ui5_cl_demo_app_026.clas.abap @@ -76,7 +76,7 @@ CLASS Z2UI5_CL_DEMO_APP_026 IMPLEMENTATION. )->label( 'Link' )->link( text = 'Documentation UI5 Popover Control' href = 'https://openui5.hana.ondemand.com/entity/sap.m.Popover' )->label( 'placement' - )->segmented_button( client->_bind_edit( mv_placement ) + )->segmented_button( selected_key = client->_bind_edit( mv_placement ) )->items( )->segmented_button_item( key = 'Left' diff --git a/src/z2ui5_cl_demo_app_049.clas.abap b/src/z2ui5_cl_demo_app_049.clas.abap index 9394816b..be5fd772 100644 --- a/src/z2ui5_cl_demo_app_049.clas.abap +++ b/src/z2ui5_cl_demo_app_049.clas.abap @@ -109,7 +109,7 @@ CLASS Z2UI5_CL_DEMO_APP_049 IMPLEMENTATION. ). - page->segmented_button( client->_bind_edit( mv_key ) + page->segmented_button( selected_key = client->_bind_edit( mv_key ) )->items( )->segmented_button_item( key = 'VIEW_REFRESH' diff --git a/src/z2ui5_cl_demo_app_081.clas.abap b/src/z2ui5_cl_demo_app_081.clas.abap index 6977cd1a..1c1cded2 100644 --- a/src/z2ui5_cl_demo_app_081.clas.abap +++ b/src/z2ui5_cl_demo_app_081.clas.abap @@ -40,11 +40,6 @@ ENDCLASS. CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. -* ---------------------------------------------------------------------------------------+ -* | Instance Protected Method Z2UI5_CL_DEMO_APP_026->Z2UI5_DISPLAY_POPOVER -* +-------------------------------------------------------------------------------------------------+ -* | [--->] ID TYPE STRING -* +-------------------------------------------------------------------------------------- METHOD Z2UI5_display_popover. DATA(view) = Z2UI5_cl_xml_view=>factory_popup( ). @@ -72,12 +67,6 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. ENDMETHOD. - -* ---------------------------------------------------------------------------------------+ -* | Instance Protected Method Z2UI5_CL_DEMO_APP_026->Z2UI5_DISPLAY_POPOVER_LIST -* +-------------------------------------------------------------------------------------------------+ -* | [--->] ID TYPE STRING -* +-------------------------------------------------------------------------------------- METHOD Z2UI5_display_popover_list. DATA(view) = Z2UI5_cl_xml_view=>factory_popup( ). @@ -103,10 +92,6 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. ENDMETHOD. -* ---------------------------------------------------------------------------------------+ -* | Instance Protected Method Z2UI5_CL_DEMO_APP_026->Z2UI5_DISPLAY_VIEW -* +-------------------------------------------------------------------------------------------------+ -* +-------------------------------------------------------------------------------------- METHOD Z2UI5_display_view. DATA(view) = z2ui5_cl_xml_view=>factory( ). @@ -126,7 +111,7 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. )->label( 'Link' )->link( text = 'Documentation UI5 Popover Control' href = 'https://openui5.hana.ondemand.com/entity/sap.m.Popover' )->label( 'placement' - )->segmented_button( client->_bind_edit( mv_placement ) + )->segmented_button( selected_key = client->_bind_edit( mv_placement ) )->items( )->segmented_button_item( key = 'Left' @@ -156,12 +141,6 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. ENDMETHOD. - -* ---------------------------------------------------------------------------------------+ -* | Instance Public Method Z2UI5_CL_DEMO_APP_026->Z2UI5_IF_APP~MAIN -* +-------------------------------------------------------------------------------------------------+ -* | [--->] CLIENT TYPE REF TO Z2UI5_IF_CLIENT -* +-------------------------------------------------------------------------------------- METHOD Z2UI5_if_app~main. me->client = client. @@ -178,10 +157,6 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. ENDMETHOD. -* ---------------------------------------------------------------------------------------+ -* | Instance Protected Method Z2UI5_CL_DEMO_APP_026->Z2UI5_ON_EVENT -* +-------------------------------------------------------------------------------------------------+ -* +-------------------------------------------------------------------------------------- METHOD Z2UI5_on_event. CASE client->get( )-event. @@ -212,10 +187,6 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. ENDMETHOD. -* ---------------------------------------------------------------------------------------+ -* | Instance Protected Method Z2UI5_CL_DEMO_APP_026->Z2UI5_ON_INIT -* +-------------------------------------------------------------------------------------------------+ -* +-------------------------------------------------------------------------------------- METHOD Z2UI5_on_init. mv_placement = 'Left'. diff --git a/src/z2ui5_cl_demo_app_109.clas.abap b/src/z2ui5_cl_demo_app_109.clas.abap index b9266b42..c3b3cb92 100644 --- a/src/z2ui5_cl_demo_app_109.clas.abap +++ b/src/z2ui5_cl_demo_app_109.clas.abap @@ -34,9 +34,6 @@ CLASS z2ui5_cl_demo_app_109 IMPLEMENTATION. DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = mv_placement -* beforeclose = client->_event( val = `CLOSE_POPOVER` ) -* beforeclose = client->_event_client( client->cs_event-popover_close ) -* afterclose = client->_event( `CLOSE_POPOVER` ) )->quick_view_page( pageid = `employeePageId` header = `Employee Info` title = `choper725` @@ -88,7 +85,7 @@ CLASS z2ui5_cl_demo_app_109 IMPLEMENTATION. )->content( 'form' )->title( 'QuickView Popover' )->label( 'placement' - )->segmented_button( client->_bind_edit( mv_placement ) + )->segmented_button( selected_key = client->_bind_edit( mv_placement ) )->items( )->segmented_button_item( key = 'Left' diff --git a/src/z2ui5_cl_demo_app_118.clas.abap b/src/z2ui5_cl_demo_app_118.clas.abap new file mode 100644 index 00000000..f588c5b5 --- /dev/null +++ b/src/z2ui5_cl_demo_app_118.clas.abap @@ -0,0 +1,113 @@ +CLASS z2ui5_cl_demo_app_118 DEFINITION + PUBLIC + FINAL + CREATE PUBLIC . + + PUBLIC SECTION. + + INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . + + TYPES: BEGIN OF s_row, + id TYPE i, + descr TYPE string, + adate TYPE d, + atime TYPE t, + END OF s_row. + TYPES: t_rows TYPE STANDARD TABLE OF s_row WITH EMPTY KEY. + + DATA: problematic_rows TYPE t_rows. + DATA: these_are_fine_rows TYPE t_rows. + + DATA: check_initialized TYPE abap_bool. + PROTECTED SECTION. + PRIVATE SECTION. +ENDCLASS. + + + +CLASS z2ui5_cl_demo_app_118 IMPLEMENTATION. + METHOD z2ui5_if_app~main. + + IF check_initialized = abap_false. + check_initialized = abap_true. + problematic_rows = VALUE #( + ( id = 1 descr = 'First row' adate = sy-datum atime = sy-uzeit ) + ( id = 2 descr = 'Second row' adate = sy-datum atime = sy-uzeit ) + ( id = 3 descr = 'Third row' adate = '' atime = '' ) + ( id = 4 descr = 'Fourth row' adate = '' atime = '' ) + ( id = 5 descr = 'Fifth row' adate = sy-datum atime = sy-uzeit ) + ). + + these_are_fine_rows = VALUE #( + ( id = 1 descr = 'First row' adate = sy-datum atime = sy-uzeit ) + ( id = 2 descr = 'Second row' adate = 0 atime = 0 ) + ( id = 3 descr = 'Third row' adate = 0 atime = 0 ) + ( id = 4 descr = 'Fourth row' adate = 0 atime = 0 ) + ( id = 5 descr = 'Fifth row' adate = sy-datum atime = sy-uzeit ) + ). + + ENDIF. + + + DATA(view) = z2ui5_cl_xml_view=>factory( ). + + DATA(page) = view->_z2ui5( )->title( 'ABAP2UI5 Weird behavior showcase' )->shell( + )->page( + title = 'ABAP2UI5 Weird behavior showcase' + navbuttonpress = client->_event( 'BACK' ) + showheader = abap_true ). + + DATA(tab_ko) = page->table( + mode = 'MultiSelect' + items = client->_bind_edit( problematic_rows ) ). + + tab_ko->header_toolbar( + )->toolbar( + )->title( |This table has the weird behavior| + )->toolbar_spacer( + )->button( + text = |Go| + icon = 'sap-icon://blur' + press = client->_event( 'ON_BTN_GO' ) ). + + tab_ko->columns( + )->column( )->text( 'ID' )->get_parent( + )->column( )->text( 'Description' )->get_parent( + )->column( )->text( 'Date ' )->get_parent( + )->column( )->text( 'Time' ). + + tab_ko->items( + )->column_list_item( + )->cells( + )->object_identifier( title = '{ID}' text = '{DESCR}' )->get_parent( + )->text( '{ADATE}' + )->text( '{ATIME}' ). + + + DATA(tab_ok) = page->table( + mode = 'MultiSelect' + items = client->_bind_edit( these_are_fine_rows ) ). + + tab_ok->header_toolbar( + )->toolbar( + )->title( |This table is fine| ). + + tab_ok->columns( + )->column( )->text( 'ID' )->get_parent( + )->column( )->text( 'Description' )->get_parent( + )->column( )->text( 'Date ' )->get_parent( + )->column( )->text( 'Time' ). + + tab_ok->items( + )->column_list_item( + )->cells( + )->object_identifier( title = '{ID}' text = '{DESCR}' )->get_parent( + )->text( '{ADATE}' + )->text( '{ATIME}' ). + + client->view_display( view->stringify( ) ). + + ENDMETHOD. + +ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_118.clas.xml b/src/z2ui5_cl_demo_app_118.clas.xml new file mode 100644 index 00000000..81ecd371 --- /dev/null +++ b/src/z2ui5_cl_demo_app_118.clas.xml @@ -0,0 +1,16 @@ + + + + + + Z2UI5_CL_DEMO_APP_118 + E + data binding tables with invalid date and time + 1 + X + X + X + + + +