table growing entries (#104)

This commit is contained in:
oblomov 2023-03-18 10:44:57 +01:00
parent b0caecb3f7
commit 867bf2a1ef
3 changed files with 19 additions and 12 deletions

View File

@ -22,7 +22,7 @@ ENDCLASS.
CLASS Z2UI5_CL_APP_DEMO_06 IMPLEMENTATION. CLASS z2ui5_cl_app_demo_06 IMPLEMENTATION.
METHOD z2ui5_if_app~controller. METHOD z2ui5_if_app~controller.
@ -31,8 +31,10 @@ CLASS Z2UI5_CL_APP_DEMO_06 IMPLEMENTATION.
WHEN client->cs-lifecycle_method-on_init. WHEN client->cs-lifecycle_method-on_init.
t_tab = REDUCE #( INIT ret = VALUE #( ) FOR n = 1 WHILE n < 101 NEXT ret = DO 1000 TIMES.
VALUE #( BASE ret ( title = 'Hans' value = 'red' info = 'completed' descr = 'this is a description' checkbox = abap_true ) ) ). DATA(ls_row) = VALUE ty_Row( title = 'row_' && sy-index value = 'red' info = 'completed' descr = 'this is a description' checkbox = abap_true ).
INSERT ls_row INTO TABLE t_tab.
ENDDO.
WHEN client->cs-lifecycle_method-on_event. WHEN client->cs-lifecycle_method-on_event.
@ -56,13 +58,16 @@ CLASS Z2UI5_CL_APP_DEMO_06 IMPLEMENTATION.
DATA(view) = client->factory_view( ). DATA(view) = client->factory_view( ).
DATA(page) = view->page( title = 'abap2UI5 - Scroll Container with Table and Toolbar' navbuttontap = view->_event( 'BACK' ) ). DATA(page) = view->page( title = 'abap2UI5 - Scroll Container with Table and Toolbar' navbuttontap = view->_event( 'BACK' ) ).
page->header_content( )->link( text = 'Go to Source Code' href = client->get( )-s_request-url_source_code ). page->header_content( )->link( text = 'Go to Source Code' href = client->get( )-s_request-url_source_code ).
"set table and container "set table and container
DATA(tab) = page->scroll_container( '70%' )->table( DATA(tab) = page->scroll_container( '70%' )->table(
growing = abap_true
growingThreshold = '20'
growingScrollToLoad = abap_true
items = view->_bind_one_way( t_tab ) items = view->_bind_one_way( t_tab )
sticky = 'ColumnHeaders,HeaderToolbar' sticky = 'ColumnHeaders,HeaderToolbar'
). ).
"set toolbar "set toolbar
tab->header_toolbar( )->overflow_toolbar( tab->header_toolbar( )->overflow_toolbar(

View File

@ -1761,6 +1761,7 @@ CLASS z2ui5_lcl_if_view IMPLEMENTATION.
( n = 'headerText' v = headertext ) ( n = 'headerText' v = headertext )
( n = 'growing' v = growing ) ( n = 'growing' v = growing )
( n = 'growingThreshold' v = growingthreshold ) ( n = 'growingThreshold' v = growingthreshold )
( n = 'growingScrollToLoad' v = growingScrollToLoad )
( n = 'sticky' v = sticky ) ( n = 'sticky' v = sticky )
( n = 'mode' v = mode ) ( n = 'mode' v = mode )
) ). ) ).

View File

@ -162,12 +162,13 @@ INTERFACE z2ui5_if_view
METHODS table METHODS table
IMPORTING IMPORTING
items TYPE clike OPTIONAL items TYPE clike OPTIONAL
growing TYPE clike OPTIONAL growing TYPE clike OPTIONAL
growingThreshold TYPE clike OPTIONAL growingThreshold TYPE clike OPTIONAL
headerText TYPE clike OPTIONAL growingScrollToLoad TYPE clike OPTIONAL
sticky TYPE clike OPTIONAL headerText TYPE clike OPTIONAL
mode TYPE clike OPTIONAL sticky TYPE clike OPTIONAL
mode TYPE clike OPTIONAL
PREFERRED PARAMETER items PREFERRED PARAMETER items
RETURNING RETURNING
VALUE(result) TYPE REF TO z2ui5_if_view. VALUE(result) TYPE REF TO z2ui5_if_view.