Skip to content

Commit 00fc905

Browse files
authored
metadata binding (abap2UI5#474)
1 parent d09c5de commit 00fc905

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

src/z2ui5_cl_demo_app_315.clas.abap

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,25 @@ CLASS z2ui5_cl_demo_app_315 IMPLEMENTATION.
2323
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ).
2424

2525
data(tab) = page->table(
26-
items = `{TRAVEL>/BookingSupplement}`
26+
items = `{TRAVEL>/Currency}`
2727
growing = abap_true ).
2828

2929
tab->header_toolbar( )->toolbar(
3030
)->title( 'table with OData model TRAVEL' ).
3131

3232
tab->columns(
33-
)->column( )->text( 'TravelID' )->get_parent(
34-
)->column( )->text( 'BookingID' )->get_parent(
35-
)->column( )->text( 'BookingSupplementID' )->get_parent(
36-
)->column( )->text( 'SupplementID' )->get_parent(
37-
)->column( )->text( 'SupplementText' )->get_parent(
38-
)->column( )->text( 'Price' )->get_parent(
39-
)->column( )->text( 'CurrencyCode' )->get_parent( ).
33+
)->column( )->text( '{TRAVEL>/#Currency/Currency/@sap:label}' )->get_parent(
34+
)->column( )->text( '{TRAVEL>/#Currency/Currency_Text/@sap:label}' )->get_parent(
35+
)->column( )->text( '{TRAVEL>/#Currency/Decimals/@sap:label}' )->get_parent(
36+
)->column( )->text( '{TRAVEL>/#Currency/CurrencyISOCode/@sap:label}' )->get_parent(
37+
).
4038

4139
tab->items( )->column_list_item( )->cells(
42-
)->text( '{TRAVEL>TravelID}'
43-
)->text( '{TRAVEL>BookingID}'
44-
)->text( '{TRAVEL>BookingSupplementID}'
45-
)->text( '{TRAVEL>SupplementID}'
46-
)->text( '{TRAVEL>SupplementText}'
47-
)->text( '{TRAVEL>Price}'
48-
)->text( '{TRAVEL>CurrencyCode}' ).
40+
)->text( '{TRAVEL>Currency}'
41+
)->text( '{TRAVEL>Currency_Text}'
42+
)->text( '{TRAVEL>Decimals}'
43+
)->text( '{TRAVEL>CurrencyISOCode}'
44+
).
4945

5046
tab = page->table(
5147
items = `{FLIGHT>/Airport}`

0 commit comments

Comments
 (0)