mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 20:38:43 +08:00
nested views (#336)
This commit is contained in:
parent
80c73724f8
commit
bf6626ebe5
|
@ -132,6 +132,21 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` sap.z2ui5.oViewPopup = oFragment;` && |\n| &&
|
||||
` }.bind(this));` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` if (!sap.z2ui5.checkNestAfter) {` && |\n| &&
|
||||
` if (sap.z2ui5.oResponse.PARAMS.S_VIEW_NEST.XML !== '') {` && |\n| &&
|
||||
` sap.z2ui5.oController.ViewClose(sap.z2ui5.oViewNest);` && |\n| &&
|
||||
` new sap.ui.core.mvc.XMLView.create({` && |\n| &&
|
||||
` definition: sap.z2ui5.oResponse.PARAMS.S_VIEW_NEST.XML,` && |\n| &&
|
||||
` }).then(oView => {` && |\n| &&
|
||||
` oView.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL));` && |\n| &&
|
||||
` var oParent = sap.z2ui5.oView.byId(sap.z2ui5.oResponse.PARAMS.S_VIEW_NEST.ID);` && |\n| &&
|
||||
` oParent.addContent(oView);` && |\n| &&
|
||||
` sap.z2ui5.checkNestAfter = true;` && |\n| &&
|
||||
` sap.z2ui5.oViewNest = oView;` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` );` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` if (sap.z2ui5.oResponse.PARAMS.S_POPOVER.CHECK_CLOSE == true) {` && |\n| &&
|
||||
` sap.z2ui5.oController.PopoverClose();` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
|
@ -181,17 +196,17 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` }` && |\n| &&
|
||||
` sap.z2ui5.oViewPopover.destroy();` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` ViewClose: function () {` && |\n| &&
|
||||
` if (!sap.z2ui5.oView) {` && |\n| &&
|
||||
` ViewClose: function (oView) {` && |\n| &&
|
||||
` if (!oView) {` && |\n| &&
|
||||
` return;` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` sap.z2ui5.oView.destroy();` && |\n| &&
|
||||
` oView.destroy();` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` onEventFrontend: function (oEvent) {` && |\n| &&
|
||||
|\n| &&
|
||||
` switch (oEvent.EVENT) {` && |\n| &&
|
||||
` case 'LOCATION_RELOAD':` && |\n| &&
|
||||
` window.location = arguments[ 1 ];` && |\n| &&
|
||||
` window.location = arguments[1];` && |\n| &&
|
||||
` break;` && |\n| &&
|
||||
` case 'POPUP_CLOSE':` && |\n| &&
|
||||
` sap.z2ui5.oController.PopupClose();` && |\n| &&
|
||||
|
@ -202,7 +217,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` onEventPromise: function (Promise) {` && |\n| &&
|
||||
` ` && |\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
` onEvent: function (oEvent) {` && |\n| &&
|
||||
|\n| &&
|
||||
|
@ -215,7 +230,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` this.oBody = {};` && |\n| &&
|
||||
` this.oBody.oUpdate = sap.z2ui5.oView.getModel().getData().oUpdate;` && |\n| &&
|
||||
` if (oEvent.CHECK_VIEW_DESTROY) {` && |\n| &&
|
||||
` sap.z2ui5.oController.ViewClose();` && |\n| &&
|
||||
` sap.z2ui5.oController.ViewClose(sap.z2ui5.oView);` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` if (sap.z2ui5.oResponse.PARAMS.T_SCROLL) {` && |\n| &&
|
||||
` this.oBody.oScroll = sap.z2ui5.oResponse.PARAMS.T_SCROLL;` && |\n| &&
|
||||
|
@ -268,7 +283,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` var oModel = new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL);` && |\n| &&
|
||||
` if (sap.z2ui5.oResponse.PARAMS.S_VIEW.CHECK_DESTROY == true) { if (sap.z2ui5.oView) { sap.z2ui5.oView.destroy(); } }` && |\n| &&
|
||||
` if (sap.z2ui5.oResponse.PARAMS.S_VIEW.XML !== '') {` && |\n| &&
|
||||
` sap.z2ui5.oController.ViewClose();` && |\n| &&
|
||||
` sap.z2ui5.oController.ViewClose(sap.z2ui5.oView);` && |\n| &&
|
||||
` new sap.ui.core.mvc.XMLView.create({` && |\n| &&
|
||||
` definition: sap.z2ui5.oResponse.PARAMS.S_VIEW.XML,` && |\n| &&
|
||||
` }).then(oView => {` && |\n| &&
|
||||
|
@ -313,6 +328,8 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` sap.z2ui5.oBody.OLOCATION.SEARCH = window.location.search;` && |\n| &&
|
||||
` sap.z2ui5.oBody.OLOCATION.VERSION = sap.ui.getVersionInfo().gav;` && |\n| &&
|
||||
|\n| &&
|
||||
` delete sap.z2ui5.checkNestAfter;` && |\n| &&
|
||||
|\n| &&
|
||||
` if (sap.z2ui5.readOData) {` && |\n| &&
|
||||
` sap.z2ui5.readOData();` && |\n| &&
|
||||
` } else {` && |\n| &&
|
||||
|
@ -326,7 +343,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` }` && |\n| &&
|
||||
` if (!sap.z2ui5.pathname) {` && |\n| &&
|
||||
` sap.z2ui5.pathname = window.location.pathname;` && |\n| &&
|
||||
` // sap.z2ui5.pathname = "/sap/bc/http/sap/y2ui5_http_handler/";` && |\n| &&
|
||||
` // sap.z2ui5.pathname = "/sap/bc/http/sap/y2ui5_http_handler/z2ui5_cl_app_demo_65";` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` if (!sap.z2ui5.checkLaunchpadActive) {` && |\n| &&
|
||||
` sap.z2ui5.checkLaunchpadActive = false;` && |\n| &&
|
||||
|
@ -343,9 +360,8 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
|||
` sap.z2ui5.checkLogActive = ` && z2ui5_lcl_utility=>get_json_boolean( check_logging ) && `;` && |\n| &&
|
||||
` sap.z2ui5.oBody = {};` && |\n| &&
|
||||
` sap.z2ui5.oController.Roundtrip();` && |\n| &&
|
||||
|\n| &&
|
||||
` });` && |\n| &&
|
||||
`</script>` && |\n| &&
|
||||
`</script>` && |\n| &&
|
||||
`</html>`.
|
||||
|
||||
* ` sap.z2ui5.checkLogActive = ` && z2ui5_lcl_utility=>get_json_boolean( check_logging ) && `;` && |\n| &&
|
||||
|
|
|
@ -657,6 +657,11 @@ CLASS z2ui5_lcl_fw_handler DEFINITION.
|
|||
xml TYPE string,
|
||||
check_destroy TYPE abap_bool,
|
||||
END OF s_view,
|
||||
BEGIN OF s_view_nest,
|
||||
xml TYPE string,
|
||||
id TYPE string,
|
||||
check_destroy TYPE abap_bool,
|
||||
END OF s_view_nest,
|
||||
BEGIN OF s_popup,
|
||||
xml TYPE string,
|
||||
id TYPE string,
|
||||
|
@ -944,7 +949,7 @@ CLASS z2ui5_lcl_fw_app IMPLEMENTATION.
|
|||
|
||||
DATA(ls_get) = client->get( ).
|
||||
DATA(lv_url_app) = ls_get-s_config-origin && ls_get-s_config-pathname.
|
||||
DATA(lv_url) = lv_url_app.
|
||||
DATA(lv_url) = lv_url_app.
|
||||
SHIFT lv_url RIGHT DELETING TRAILING ls_get-s_config-path_info.
|
||||
SHIFT lv_url LEFT DELETING LEADING ` `.
|
||||
|
||||
|
@ -1695,6 +1700,13 @@ CLASS z2ui5_lcl_fw_client IMPLEMENTATION.
|
|||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD z2ui5_if_client~view_display_nested.
|
||||
|
||||
mo_handler->ms_next-s_set-s_view_nest-xml = val.
|
||||
mo_handler->ms_next-s_set-s_view_nest-id = id.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD z2ui5_if_client~_bind.
|
||||
|
||||
result = mo_handler->_create_binding( value = val type = z2ui5_lcl_fw_handler=>cs_bind_type-one_way ).
|
||||
|
|
|
@ -53,6 +53,11 @@ INTERFACE z2ui5_if_client
|
|||
IMPORTING
|
||||
val TYPE clike.
|
||||
|
||||
METHODS view_display_nested
|
||||
IMPORTING
|
||||
val TYPE clike
|
||||
id type clike.
|
||||
|
||||
METHODS cursor_set
|
||||
IMPORTING
|
||||
id TYPE clike
|
||||
|
|
Loading…
Reference in New Issue
Block a user