Skip to content

Commit aa636e0

Browse files
authored
new-ui5-app (#392)
* new-ui5-app * update scroll bug
1 parent 6287cd9 commit aa636e0

6 files changed

+15
-337
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
built_in TYPE abap_bool,
1919
END OF ms_check_expanded.
2020

21-
DATA mt_scroll TYPE z2ui5_cl_cc_scrolling=>ty_t_item.
21+
DATA mt_scroll TYPE z2ui5_if_types=>ty_t_name_value.
2222
DATA mv_set_scroll TYPE abap_bool.
2323

2424
PROTECTED SECTION.
@@ -37,7 +37,7 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
3737

3838
IF client->get( )-check_on_navigated = abap_true.
3939
IF mt_scroll IS INITIAL.
40-
mt_scroll = VALUE #( ( id = `page` ) ).
40+
mt_scroll = VALUE #( ( n = `page` ) ).
4141
ENDIF.
4242
mv_set_scroll = abap_true.
4343
ENDIF.
@@ -245,13 +245,6 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
245245
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
246246
).
247247

248-
panel->generic_tile(
249-
header = 'Tab Favicon'
250-
press = client->_event( 'z2ui5_cl_demo_app_171' )
251-
mode = 'LineMode'
252-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
253-
).
254-
255248

256249
panel->generic_tile(
257250
header = 'Session Stickyness I'
@@ -1187,14 +1180,6 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
11871180
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
11881181
).
11891182

1190-
* panel->generic_tile(
1191-
* header = 'Popover'
1192-
* subheader = 'Call from Nested Views & Popup'
1193-
* press = client->_event( 'z2ui5_cl_demo_app_147' )
1194-
* mode = 'LineMode'
1195-
* class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1196-
* ).
1197-
11981183

11991184
panel = page->panel(
12001185
expandable = abap_false
@@ -1559,31 +1544,23 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
15591544
).
15601545

15611546
panel->generic_tile(
1562-
header = 'Nested Views II'
1563-
subheader = 'Master-Detail Page'
1564-
press = client->_event( 'Z2UI5_CL_DEMO_APP_066' )
1565-
mode = 'LineMode'
1566-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1567-
).
1568-
1569-
panel->generic_tile(
1570-
header = 'Nested Views III'
1547+
header = 'Nested Views II'
15711548
subheader = 'Head & Item Table'
15721549
press = client->_event( 'Z2UI5_CL_DEMO_APP_097' )
15731550
mode = 'LineMode'
15741551
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
15751552
).
15761553

15771554
panel->generic_tile(
1578-
header = 'Nested Views IV'
1555+
header = 'Nested Views III'
15791556
subheader = 'Head & Item Table & Detail'
15801557
press = client->_event( 'Z2UI5_CL_DEMO_APP_098' )
15811558
mode = 'LineMode'
15821559
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
15831560
).
15841561

15851562
panel->generic_tile(
1586-
header = 'Nested Views V'
1563+
header = 'Nested Views IV'
15871564
subheader = 'Sub-App'
15881565
press = client->_event( 'Z2UI5_CL_DEMO_APP_104' )
15891566
mode = 'LineMode'
@@ -1596,7 +1573,6 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
15961573
headertext = `Navigation Container`
15971574
).
15981575

1599-
16001576
panel->generic_tile(
16011577
header = 'Nav Container I'
16021578
press = client->_event( 'Z2UI5_CL_DEMO_APP_088' )

src/z2ui5_cl_demo_app_066.clas.abap

Lines changed: 0 additions & 203 deletions
This file was deleted.

src/z2ui5_cl_demo_app_066.clas.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/z2ui5_cl_demo_app_134.clas.abap

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ CLASS z2ui5_cl_demo_app_134 DEFINITION PUBLIC.
2323
DATA selend TYPE string.
2424
DATA update_focus TYPE abap_bool.
2525

26-
DATA mt_scroll TYPE z2ui5_cl_cc_scrolling=>ty_t_item.
26+
DATA mt_scroll TYPE z2ui5_if_types=>ty_t_name_value.
2727

2828
PROTECTED SECTION.
2929
METHODS display_view
3030
IMPORTING
3131
client TYPE REF TO z2ui5_if_client.
32+
3233
METHODS init
3334
IMPORTING
3435
client TYPE REF TO z2ui5_if_client.
36+
3537
PRIVATE SECTION.
3638
ENDCLASS.
3739

@@ -93,7 +95,7 @@ CLASS z2ui5_cl_demo_app_134 IMPLEMENTATION.
9395
selstart = `3`.
9496
selend = `7`.
9597

96-
INSERT VALUE #( id = 'id_page' ) INTO TABLE mt_scroll.
98+
INSERT VALUE #( n = 'id_page' ) INTO TABLE mt_scroll.
9799
display_view( client ).
98100

99101
ENDMETHOD.
@@ -114,35 +116,35 @@ CLASS z2ui5_cl_demo_app_134 IMPLEMENTATION.
114116

115117
WHEN 'BUTTON_SCROLL_TOP'.
116118
CLEAR mt_scroll.
117-
INSERT VALUE #( id = 'id_page' scrollto = '0' ) INTO TABLE mt_scroll.
119+
INSERT VALUE #( n = 'id_page' v = '0' ) INTO TABLE mt_scroll.
118120
mv_scrollupdate = abap_true.
119121
client->view_model_update( ).
120122

121123
WHEN 'BUTTON_SCROLL_UP'.
122124

123-
DATA(lv_pos) = CONV i( mt_scroll[ id = 'id_page' ]-scrollto ).
125+
DATA(lv_pos) = CONV i( mt_scroll[ n = 'id_page' ]-v ).
124126
lv_pos = lv_pos - 500.
125127
IF lv_pos < 0.
126128
lv_pos = 0.
127129
ENDIF.
128-
mt_scroll[ id = 'id_page' ]-scrollto = shift_left( shift_right( CONV string( lv_pos ) ) ).
130+
mt_scroll[ n = 'id_page' ]-v = shift_left( shift_right( CONV string( lv_pos ) ) ).
129131
mv_scrollupdate = abap_true.
130132
client->view_model_update( ).
131133

132134
WHEN 'BUTTON_SCROLL_DOWN'.
133135

134-
lv_pos = mt_scroll[ id = 'id_page' ]-scrollto.
136+
lv_pos = mt_scroll[ n = 'id_page' ]-v.
135137
lv_pos = lv_pos + 500.
136138
IF lv_pos < 0.
137139
lv_pos = 0.
138140
ENDIF.
139-
mt_scroll[ id = 'id_page' ]-scrollto = shift_left( shift_right( CONV string( lv_pos ) ) ).
141+
mt_scroll[ n = 'id_page' ]-v = shift_left( shift_right( CONV string( lv_pos ) ) ).
140142
mv_scrollupdate = abap_true.
141143
client->view_model_update( ).
142144

143145
WHEN 'BUTTON_SCROLL_BOTTOM'.
144146
CLEAR mt_scroll.
145-
INSERT VALUE #( id = 'id_page' scrollto = '99999' ) INTO TABLE mt_scroll.
147+
INSERT VALUE #( n = 'id_page' v = '99999' ) INTO TABLE mt_scroll.
146148
mv_scrollupdate = abap_true.
147149
client->view_model_update( ).
148150

0 commit comments

Comments
 (0)