@@ -123,27 +123,23 @@ CLASS Z2UI5_CL_HTTP_HANDLER IMPLEMENTATION.
123
123
` var oView = this.getView();` && | \n| &&
124
124
` try {` && | \n| &&
125
125
` if (sap.z2ui5.oResponse.oCursor) {` && | \n| &&
126
- ` var ofocus = oView.byId(sap.z2ui5.oResponse.oCursor.id ).getFocusInfo();` && | \n| &&
127
- ` ofocus.cursorPos = sap.z2ui5.oResponse.oCursor.cursorPos ;` && | \n| &&
128
- ` ofocus.selectionStart = sap.z2ui5.oResponse.oCursor.selectionStart ;` && | \n| &&
129
- ` ofocus.selectionEnd = sap.z2ui5.oResponse.oCursor.selectionEnd ;` && | \n| &&
126
+ ` var ofocus = oView.byId(sap.z2ui5.oResponse.oCursor.ID ).getFocusInfo();` && | \n| &&
127
+ ` ofocus.cursorPos = parseInt( sap.z2ui5.oResponse.oCursor.CURSORPOS ) ;` && | \n| &&
128
+ ` ofocus.selectionStart = parseInt( sap.z2ui5.oResponse.oCursor.SELECTIONSTART ) ;` && | \n| &&
129
+ ` ofocus.selectionEnd = parseInt( sap.z2ui5.oResponse.oCursor.SELECTIONEND ) ;` && | \n| &&
130
130
` }` && | \n| &&
131
- ` oView.byId(sap.z2ui5.oResponse.oCursor.id ).applyFocusInfo(ofocus);` && | \n| &&
131
+ ` oView.byId(sap.z2ui5.oResponse.oCursor.ID ).applyFocusInfo(ofocus);` && | \n| &&
132
132
` } catch (error) { };` && | \n| &&
133
133
` try {` && | \n| &&
134
- ` // oView.getContent()[0].getApp().scrollTo(sap.z2ui5.oResponse.PAGE_SCROLL_POS);` && | \n| &&
135
134
` } catch (error) { };` && | \n| &&
136
- ` //todo` && | \n| &&
137
135
` if (sap.z2ui5.oResponse.oScroll) {` && | \n| &&
138
- ` sap.z2ui5.oResponse.oScroll.forEach(item => Object.keys(item).forEach(function (key, index) {` && | \n| &&
139
- ` try {` && | \n| &&
140
- ` oView.byId(key).scrollTo(item[key]);` && | \n| &&
141
- ` } catch (e) {` && | \n| &&
142
- ` var ele = '#' + oView.byId(key).getId() + '-inner';` && | \n| &&
143
- ` $(ele).scrollTop(item[key]);` && | \n| &&
144
- ` }` && | \n| &&
145
- ` // index: the ordinal position of the key within the object ` && | \n| &&
146
- ` }));` && | \n| &&
136
+ ` sap.z2ui5.oResponse.oScroll.forEach(` && | \n| &&
137
+ ` item => { try { oView.byId(item.NAME).scrollTo( parseInt( item.VALUE ) ); ` && | \n| &&
138
+ ` } catch (e) {` && | \n| &&
139
+ ` var ele = '#' + oView.byId(item.NAME).getId() + '-inner';` && | \n| &&
140
+ ` $(ele).scrollTop(item.VALUE); ` && | \n| &&
141
+ ` } ` && | \n| &&
142
+ ` } );` && | \n| &&
147
143
` }` && | \n| &&
148
144
` if (sap.z2ui5.oResponse.vViewPopup) {` && | \n| &&
149
145
` ` && | \n| &&
@@ -163,9 +159,9 @@ CLASS Z2UI5_CL_HTTP_HANDLER IMPLEMENTATION.
163
159
` }` && | \n| &&
164
160
` if (sap.z2ui5.oResponse.oTimer){ ` && | \n| &&
165
161
` var oEvent = { 'EVENT' : 'BUTTON_CHECK', 'METHOD' : 'UPDATE' };` && | \n| &&
166
- ` oEvent.EVENT = sap.z2ui5.oResponse.oTimer.eventFinished ;` && | \n| &&
162
+ ` oEvent.EVENT = sap.z2ui5.oResponse.oTimer.EVENT_FINISHED ;` && | \n| &&
167
163
` sap.z2ui5.checkTimerActive = true;` && | \n| &&
168
- ` setTimeout( ( ) => { if ( sap.z2ui5.checkTimerActive ) { sap.z2ui5.oView.getController().onEvent( oEvent ); } }, sap.z2ui5.oResponse.oTimer.intervalMs , oEvent );` && | \n| &&
164
+ ` setTimeout( ( ) => { if ( sap.z2ui5.checkTimerActive ) { sap.z2ui5.oView.getController().onEvent( oEvent ); } }, parseInt( sap.z2ui5.oResponse.oTimer.INTERVAL_MS ) , oEvent );` && | \n| &&
169
165
` }` && | \n| &&
170
166
` sap.ui.core.BusyIndicator.hide();` && | \n| &&
171
167
` },` && | \n| &&
@@ -203,6 +199,19 @@ CLASS Z2UI5_CL_HTTP_HANDLER IMPLEMENTATION.
203
199
` this.oBody.oUpdate = sap.z2ui5.oView.getModel().oData.oUpdate;` && | \n| &&
204
200
` }` && | \n| &&
205
201
| \n| &&
202
+ ` if (sap.z2ui5.oResponse.oScroll) {` && | \n| &&
203
+ ` this.oBody.oScroll = sap.z2ui5.oResponse.oScroll; ` && | \n| &&
204
+ ` this.oBody.oScroll .forEach(` && | \n| &&
205
+ ` item => { try { ` && | \n| &&
206
+ ` item.VALUE = this.getView().byId( item.NAME ).getScrollDelegate().getScrollTop(); ` && | \n| &&
207
+ ` } catch (e) {` && | \n| &&
208
+ ` var ele = '#' + this.getView( ).byId(item.NAME).getId() + '-inner';` && | \n| &&
209
+ ` item.VALUE = $(ele).scrollTop(); ` && | \n| &&
210
+ ` } ` && | \n| &&
211
+ ` } );` && | \n| &&
212
+ ` }` && | \n| &&
213
+
214
+
206
215
` this.oBody.oSystem = sap.z2ui5.oResponse.oSystem;` && | \n| &&
207
216
` this.oBody.oEvent = oEvent;` && | \n| &&
208
217
` this.oBody.oEvent.vData = vData;` && | \n| &&
@@ -251,9 +260,9 @@ CLASS Z2UI5_CL_HTTP_HANDLER IMPLEMENTATION.
251
260
` }` && | \n| &&
252
261
` }` && | \n| &&
253
262
| \n| &&
254
- ` if (sap.z2ui5.oResponse.oAfter ) {` && | \n| &&
255
- ` sap.z2ui5.oResponse.oAfter.forEach(item => sap.m[item[0]][item[1]](item[2]) );` && | \n| &&
256
- ` }` && | \n| &&
263
+ ` if (sap.z2ui5.oResponse.oMessage ) {` && | \n| &&
264
+ ` sap.m[sap. z2ui5.oResponse.oMessage.CONTROL][ sap.z2ui5.oResponse.oMessage.TYPE](sap.z2ui5.oResponse.oMessage.TEXT );` && | \n| &&
265
+ ` }` && | \n| &&
257
266
| \n| &&
258
267
` if (sap.z2ui5.oResponse.vView) {` && | \n| &&
259
268
` var oModel = new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.oViewModel);` && | \n| &&
0 commit comments