Skip to content

Commit cdb4535

Browse files
authored
switch smart multiinput demo to travel odata servi (#464)
1 parent c56ff1a commit cdb4535

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

+8
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,14 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
19651965
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
19661966
).
19671967

1968+
1969+
panel->generic_tile( header = 'Smart Multi Input'
1970+
subheader = ``
1971+
press = client->_event( 'z2ui5_cl_demo_app_319' )
1972+
mode = 'LineMode'
1973+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1974+
).
1975+
19681976
panel->generic_tile( header = 'Smart Controls with Variants'
19691977
subheader = ``
19701978
press = client->_event( 'Z2UI5_CL_DEMO_APP_313' )

src/z2ui5_cl_demo_app_319.clas.abap

+13-9
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ CLASS z2ui5_cl_demo_app_319 IMPLEMENTATION.
5151

5252
DATA(l_view) = z2ui5_cl_xml_view=>factory( ).
5353

54-
DATA(l_page) = l_view->shell( appwidthlimited = 'false' )->page(
55-
id = 'SearchPage'
56-
title = TEXT-001
57-
shownavbutton = abap_false
58-
showheader = abap_true ).
54+
DATA(l_page) = l_view->shell( )->page( title = 'SearchPage'
55+
navbuttonpress = m_client->_event( 'BACK' )
56+
shownavbutton = m_client->check_app_prev_stack( ) ).
5957

6058
l_page->_z2ui5( )->smartmultiinput_ext(
6159
addedtokens = m_client->_bind_edit( val = m_selection-product_type-tokens_added switch_default_model = abap_true )
@@ -66,20 +64,26 @@ CLASS z2ui5_cl_demo_app_319 IMPLEMENTATION.
6664

6765
l_page->smart_multi_input(
6866
id = 'ProductTypeMultiInput'
69-
value = '{ProductType}'
70-
entityset = 'ProductList'
67+
* value = '{ProductType}'
68+
value = '{CurrencyCode}'
69+
entityset = 'Booking'
7170
supportranges = 'true'
7271
enableodataselect = 'true' ).
7372

7473
m_client->view_display( val = l_page->stringify( )
75-
switch_default_model_path = `/sap/opu/odata/sap/UI_PRODUCTLIST`
76-
switchdefaultmodelannouri = `/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='UI_PRODUCTLIST_VAN',Version='0001')/$value` ).
74+
* switch_default_model_path = `/sap/opu/odata/sap/UI_PRODUCTLIST`
75+
switch_default_model_path = `/sap/opu/odata/DMO/UI_TRAVEL_A_D_O2`
76+
* switchdefaultmodelannouri = `/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='UI_PRODUCTLIST_VAN',Version='0001')/$value`
77+
switch_default_model_anno_uri = `/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='%2FDMO%2FUI_TRAVEL_A_D_O2_VAN',Version='0001')/$value`
78+
).
7779

7880
ENDMETHOD.
7981

8082
METHOD on_event.
8183

8284
CASE m_client->get( )-event.
85+
WHEN 'BACK'.
86+
m_client->nav_app_leave( ).
8387
WHEN 'PRODTYPE_CHANGED'.
8488
TRY.
8589
m_client->message_box_display(

0 commit comments

Comments
 (0)