Skip to content

Commit 8bf0596

Browse files
authored
fix upload set (#491)
1 parent 0f81ed5 commit 8bf0596

File tree

2 files changed

+26
-31
lines changed

2 files changed

+26
-31
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,31 +1698,6 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
16981698
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
16991699
).
17001700

1701-
panel = page->panel( expandable = abap_false
1702-
expanded = abap_true
1703-
headertext = `Apps with add. Javascript`
1704-
).
1705-
1706-
panel->generic_tile( header = 'p13n Dialog'
1707-
subheader = 'Popup for F4 Helps'
1708-
press = client->_event( 'Z2UI5_CL_DEMO_APP_090' )
1709-
mode = 'LineMode'
1710-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1711-
).
1712-
1713-
panel->generic_tile( header = 'Upload Set'
1714-
subheader = ''
1715-
press = client->_event( 'Z2UI5_CL_DEMO_APP_107' )
1716-
mode = 'LineMode'
1717-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1718-
).
1719-
1720-
panel->generic_tile( header = 'Smart Variant Management'
1721-
subheader = ''
1722-
press = client->_event( 'Z2UI5_CL_DEMO_APP_111' )
1723-
mode = 'LineMode'
1724-
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1725-
).
17261701

17271702
page = page2->panel( expandable = abap_true
17281703
expanded = client->_bind_edit( ms_check_expanded-demos )
@@ -2016,6 +1991,26 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
20161991
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
20171992
).
20181993

1994+
panel->generic_tile( header = 'p13n Dialog'
1995+
subheader = 'Popup for F4 Helps'
1996+
press = client->_event( 'Z2UI5_CL_DEMO_APP_090' )
1997+
mode = 'LineMode'
1998+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
1999+
).
2000+
2001+
panel->generic_tile( header = 'Upload Set'
2002+
subheader = ''
2003+
press = client->_event( 'Z2UI5_CL_DEMO_APP_107' )
2004+
mode = 'LineMode'
2005+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
2006+
).
2007+
2008+
panel->generic_tile( header = 'Smart Variant Management'
2009+
subheader = ''
2010+
press = client->_event( 'Z2UI5_CL_DEMO_APP_111' )
2011+
mode = 'LineMode'
2012+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
2013+
).
20192014

20202015
client->view_display( page->stringify( ) ).
20212016

src/z2ui5_cl_demo_app_107.clas.abap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ CLASS Z2UI5_CL_DEMO_APP_107 IMPLEMENTATION.
4444
METHOD get_custom_js.
4545

4646
result = `` && |\n| &&
47-
`sap.z2ui5.fileGet = (oEvent,oController) => {` && |\n| &&
47+
`z2ui5.fileGet = (oEvent,oController) => {` && |\n| &&
4848
` var oFileUploadComponent = oEvent.getParameters("items").item.getFileObject();` && |\n| &&
4949
` if (oFileUploadComponent) {` && |\n| &&
5050
` _handleRawFile(oFileUploadComponent,oController);` && |\n| &&
5151
` }` && |\n| &&
52-
` console.log(sap.z2ui5.oResponse.OVIEWMODEL.XX.MV_FILE_RAW.data);` && |\n| &&
52+
` console.log(z2ui5.oResponse.OVIEWMODEL.XX.MV_FILE_RAW.data);` && |\n| &&
5353
`};` && |\n| &&
5454
`_handleRawFile = (oFile, oController) => {` && |\n| &&
5555
` var oFileRaw = {` && |\n| &&
@@ -58,7 +58,7 @@ CLASS Z2UI5_CL_DEMO_APP_107 IMPLEMENTATION.
5858
` var reader = new FileReader();` && |\n| &&
5959
` reader.onload = function (e) {` && |\n| &&
6060
` oFileRaw.data = e.target.result;` && |\n| &&
61-
` sap.z2ui5.oResponse.OVIEWMODEL.XX.MV_FILE_RAW = oFileRaw;` && |\n| &&
61+
` z2ui5.oResponse.OVIEWMODEL.XX.MV_FILE_RAW = oFileRaw;` && |\n| &&
6262
` }` && |\n| &&
6363
` reader.readAsDataURL(oFile);` && |\n| &&
6464
`};`.
@@ -103,7 +103,7 @@ CLASS Z2UI5_CL_DEMO_APP_107 IMPLEMENTATION.
103103
DATA(view) = z2ui5_cl_xml_view=>factory( ).
104104

105105
DATA(page) = view->shell( )->page(
106-
title = 'abap2UI5 - P13N Dialog'
106+
title = 'abap2UI5 - UploadSet Dialog'
107107
navbuttonpress = client->_event( 'BACK' )
108108
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
109109
class = 'sapUiContentPadding' ).
@@ -119,8 +119,8 @@ CLASS Z2UI5_CL_DEMO_APP_107 IMPLEMENTATION.
119119
mode = `MultiSelect`
120120
items = client->_bind_edit( mt_items )
121121
* afteritemadded = client->_event( val = 'AFTER' t_arg = VALUE #( ( `${$parameters>/}` ) ) )
122-
afteritemadded = `sap.z2ui5.fileGet($event,$controller)` "sap.z2ui5.updateData(${$parameters>/reason})
123-
uploadcompleted = `sap.z2ui5.fileGet($event,$controller)` "sap.z2ui5.updateData(${$parameters>/reason})
122+
afteritemadded = `z2ui5.fileGet($event,$controller)` "sap.z2ui5.updateData(${$parameters>/reason})
123+
uploadcompleted = `z2ui5.fileGet($event,$controller)` "sap.z2ui5.updateData(${$parameters>/reason})
124124
)->_generic( name = `toolbar`
125125
ns = `upload`
126126
)->overflow_toolbar(

0 commit comments

Comments
 (0)