alfresco - ajax 调用没有在 alfresco displayprompt 中被调用
问题描述
我们已经在文档库中编写了自定义 doclib 操作。我们使用的是 alfresco 5.x;当单击自定义链接时,当它失败时会调用“onManifestAsset”操作,然后它应该提示弹出窗口并显示确定和取消按钮。当我单击确定按钮,然后另一个 ajax 调用没有被调用。
YAHOO.Bubbling.fire("registerAction",
{
actionName: "onManifestAsset",
fn: function onManifestAsset(file) {
this.modules.actions.genericAction(
{
success:
{
message: this.msg("success")
},
failure:
{
callback :
{
scope: this,
fn: function(object)
{
Alfresco.util.PopupManager.displayPrompt(
{
text: "Your zip file does not include a metadata spreadsheet;",
buttons: [
{
text: "Ok",
handler: function()
{
this.destroy();
console.log("...start::::::it is normal zip without meta data template:")
//its coming here but below ajax is not getting called when I click ok button
Alfresco.util.Ajax.request(
{
url: Alfresco.constants.PROXY_URI+"xxxxx/manifestZIP?nodeRef="+file.nodeRef,
method: "GET",
successCallback:
{
fn: function dlA_onActionDetails_refreshSuccess(response) {
Alfresco.util.PopupManager.displayMessage({
text: "Success"
});
},
scope: this
},
failureMessage: this.msg("message.delete.failure", ".......")
});
}
},
{
text: "Cancel",
handler: function()
{
this.destroy();
},
isDefault: true
}
]
});
}
}
},
webscript:
{
name: "xxxx/extractAsset?nodeRef={nodeRef}",
stem: Alfresco.constants.PROXY_URI,
method: Alfresco.util.Ajax.GET,
params:
{
nodeRef: file.nodeRef
}
},
config:
{
}
});
}
})
解决方案
推荐阅读
- database-migration - Create.io 创建表时的列顺序
- r - 如何在 R 中创建具有指定列和行数的空数据框?
- file - 如何根据部分文件名使用 Google Script 自动移动 Google Drive 中的文件?
- reactjs - Rapid onChange 导致 OnClick 不注册
- inotify - inotifywait - 执行命令时暂停监控
- c# - 如何从供应商/产品 ID 获取 USB 驱动器的驱动器号?
- r - 使用向量而不是R中的正则表达式从字符串中删除多个单词
- java - 确定 JLabel 文本是否被截断?
- php - 如何在另一个页面上获取 div 项的数据属性
- discord.js - 如何编写通过公会职位随机删除人们角色的代码