3

No response when clicking close button on fragemen...

 6 months ago
source link: https://community.sap.com/t5/technology-q-a/no-response-when-clicking-close-button-on-fragement-in-custom-action-of-ui5/qaq-p/13639029
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

No response when clicking close button on fragement in custom action of UI5 Element

Hi, UI5 Expert ,

I added custom action in object page header .

The UI5 custom action can open a fragment, but when I click the close button close in the fragment, there is no reponse . It seems the fragment still search the function in standard controller of object page .Would you please help me on this ?

Jacky_Liu_0-1710468823620.png
webapp/ext/fileHandle/FileHandle.js
// sap.ui.define(["sap/ui/core/mvc/ControllerExtension","sap/ui/core/Fragment"
sap.ui.define(["sap/ui/core/Fragment"
], function(Fragment) {
'use strict';
return {
pDialog : null,
uploadfiles: function(oEvent) {
if (!this.pDialog) {
Fragment.load({
id: "uploadDialogSet",
name: "freightorderattachmgt.custom.fragment.fileselector",
type: "XML",
controller: this
}).then((oDialog) => {
var oFileUploader = Fragment.byId("uploadDialogSet", "uploadSet");
oFileUploader.removeAllItems();
this.pDialog = oDialog;
this.pDialog.open();
}).catch(error=>alert(error.message));
}else{
var oFileUploader = Fragment.byId("uploadDialogSet", "uploadSet");
oFileUploader.removeAllItems();
this.pDialog.open();
onUploadSet: function(oEvent) {
console.log("Upload Button Clicked!!!")
alert("upload set triggered");
/* TODO:Call to OData */
onCloseDialog: function (oEvent) {
console.log("Close clicked") ;
alert("upload set triggered");
this.pDialog.close();
this.byId("uploadDialogSet--uploadDialogSet").close();
onItemRemoved:function (oEvent) {
console.log("File Remove/delete Event Fired!!!")
/* TODO: Clear the already read excel file data */
onUploadSetComplete: function (oEvent) {
console.log("File Uploaded!!!")
/* TODO: Read excel file data*/
onItemRemoved:function (oEvent) {
console.log("File Remove/delete Event Fired!!!")
/* TODO: Clear the already read excel file data */
 webapp/manifest.json
"_version": "1.59.0",
"sap.app": {
"id": "freightorderattachmgt",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "0.0.1"
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"resources": "resources.json",
"sourceTemplate": {
"id": "@sap/generator-fiori:lrop",
"version": "1.12.5",
"toolsId": "608a61cb-cb63-43f7-963b-a8d0970324b7"
"dataSources": {
"mainService": {
"uri": "/sap/opu/odata4/sap/zfreightorder_srv_bind/srvd/sap/zfreightorder_service/0001/",
"type": "OData",
"settings": {
"annotations": [
"annotation"
"localUri": "localService/metadata.xml",
"odataVersion": "4.0"
"annotation": {
"type": "ODataAnnotation",
"uri": "annotations/annotation.xml",
"settings": {
"localUri": "annotations/annotation.xml"
"crossNavigation": {
"inbounds": {
"FreightOrder-display": {
"semanticObject": "FreightOrder",
"action": "display",
"title": "{{flpTitle}}",
"subTitle": "{{flpSubtitle}}",
"signature": {
"parameters": {},
"additionalParameters": "allowed"
"sap.ui": {
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone@2": "",
"tablet": "",
"tablet@2": ""
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
"sap.ui5": {
"flexEnabled": true,
"dependencies": {
"minUI5Version": "1.120.8",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.fe.templates": {}
"contentDensities": {
"compact": true,
"cozy": true
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "freightorderattachmgt.i18n.i18n"
"dataSource": "mainService",
"preload": true,
"settings": {
"synchronizationMode": "None",
"operationMode": "Server",
"autoExpandSelect": true,
"earlyRequests": true
"@i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"uri": "i18n/i18n.properties"
"resources": {
"css": []
"routing": {
"routes": [
"pattern": ":?query:",
"name": "ZC_FREIGHTORDERList",
"target": "ZC_FREIGHTORDERList"
"pattern": "ZC_FREIGHTORDER({key}):?query:",
"name": "ZC_FREIGHTORDERObjectPage",
"target": "ZC_FREIGHTORDERObjectPage"
"targets": {
"ZC_FREIGHTORDERList": {
"type": "Component",
"id": "ZC_FREIGHTORDERList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/ZC_FREIGHTORDER",
"variantManagement": "Page",
"navigation": {
"ZC_FREIGHTORDER": {
"detail": {
"route": "ZC_FREIGHTORDERObjectPage"
"ZC_FREIGHTORDERObjectPage": {
"type": "Component",
"id": "ZC_FREIGHTORDERObjectPage",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"editableHeaderContent": false,
"contextPath": "/ZC_FREIGHTORDER",
"content": {
"header": {
"actions": {
"FileHandle": {
"press": "freightorderattachmgt.ext.fileHandle.FileHandle.uploadfiles",
"visible": true,
"enabled": true,
"requiresSelection": false,
"text": "UploadFiles",
"position": {
"anchor": "DataFieldForAction::com.sap.gateway.srvd.zfreightorder_service.v0001.uploadfile::com.sap.gateway.srvd.zfreightorder_service.v0001.ZC_FREIGHTORDERType",
"placement": "Before"
"sectionLayout": "Tabs"
"extends": {
"extensions": {
"sap.ui.controllerExtensions": {
"sap.fe.templates.ObjectPage.ObjectPageController#freightorderattachmgt::ZC_FREIGHTORDERObjectPage": {
"controllerName": "freightorderattachmgt.custom.fragment.fileselector"
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK