@@ -3,7 +3,6 @@ CLASS z2ui5_cl_demo_app_314 DEFINITION PUBLIC.
33 PUBLIC SECTION .
44 INTERFACES z2ui5_if_app.
55
6-
76 TYPES :
87 BEGIN OF ty_row,
98 count TYPE i ,
@@ -17,7 +16,7 @@ CLASS z2ui5_cl_demo_app_314 DEFINITION PUBLIC.
1716 END OF ty_row.
1817 DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY .
1918
20- data mv_val type string .
19+ DATA mv_val TYPE string .
2120 PROTECTED SECTION .
2221 PRIVATE SECTION .
2322ENDCLASS .
@@ -30,58 +29,56 @@ CLASS z2ui5_cl_demo_app_314 IMPLEMENTATION.
3029
3130 IF client->check_on_init( ).
3231
33- DO 10 TIMES .
34- DATA ls_row TYPE ty_row.
35- ls_row-count = sy -index .
36- ls_row-value = 'red' .
37- ls_row-descr = 'this is a description' .
38- ls_row-checkbox = abap_true .
39- ls_row-valuecolor = `Good` .
40- INSERT ls_row INTO TABLE t_tab.
41- ENDDO .
32+ DO 10 TIMES .
33+ DATA ls_row TYPE ty_row.
34+ ls_row-count = sy -index .
35+ ls_row-value = 'red' .
36+ ls_row-descr = 'this is a description' .
37+ ls_row-checkbox = abap_true .
38+ ls_row-valuecolor = `Good` .
39+ INSERT ls_row INTO TABLE t_tab.
40+ ENDDO .
4241
4342 DATA (view ) = z2ui5_cl_xml_view=>factory( ).
4443 DATA (page ) = view->shell(
4544 )->page(
46- title = 'abap2UI5 - Table with odata source '
45+ title = 'abap2UI5 - Device Model, HTTP Model, OData Model '
4746 navbuttonpress = client->_event( 'BACK' )
4847 shownavbutton = xsdbool ( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ).
4948
49+ page->input( description = `device model` value = `{device>/resize/width}` enabled = abap_false ).
5050
51+ mv_val = `input value with http model` .
52+ page->input( client->_bind_edit( val = mv_val switchdefaultmodel = abap_true ) ).
5153
52- page->input( description = `device model` value = `{device>/resize/width}` enabled = abap_false ).
53-
54- mv_val = `input value with http model` .
55- page->input( client->_bind_edit( val = mv_val switchdefaultmodel = abap_true ) ).
54+ DATA (tab ) = page->table( client->_bind_edit( val = t_tab switchdefaultmodel = abap_true ) ).
5655
57- DATA (tab ) = page->table( client->_bind_edit( val = t_tab switchdefaultmodel = abap_true ) ).
58-
59- tab->header_toolbar(
60- )->toolbar(
61- )->title( 'table with http model (framework default)' ).
56+ tab->header_toolbar(
57+ )->toolbar(
58+ )->title( 'table with http model (framework default)' ).
6259
63- tab->columns(
64- )->column(
65- )->text( 'Value' )->get_parent(
66- )->column(
67- )->text( 'Info' )->get_parent(
68- )->column(
69- )->text( 'Description' )->get_parent( ).
60+ tab->columns(
61+ )->column(
62+ )->text( 'Value' )->get_parent(
63+ )->column(
64+ )->text( 'Info' )->get_parent(
65+ )->column(
66+ )->text( 'Description' )->get_parent( ).
7067
71- tab->items( )->column_list_item( )->cells(
72- )->text( '{http>VALUE}'
73- )->text( '{http>INFO}'
74- )->text( '{http>DESCR}' ).
68+ tab->items( )->column_list_item( )->cells(
69+ )->text( '{http>VALUE}'
70+ )->text( '{http>INFO}'
71+ )->text( '{http>DESCR}' ).
7572
7673
77- tab = page->table(
78- items = `{/BookingSupplement}`
79- growing = abap_true
80- ).
74+ tab = page->table(
75+ items = `{/BookingSupplement}`
76+ growing = abap_true
77+ ).
8178
82- tab->header_toolbar(
79+ tab->header_toolbar(
8380 )->toolbar(
84- )->title( 'table with odata model' ).
81+ )->title( 'table with odata model' ).
8582
8683 tab->columns(
8784 )->column( )->text( 'TravelID' )->get_parent(
0 commit comments