首页 > 解决方案 > 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:
                        {
                        }
                    });
                }

            })

标签: alfrescoalfresco-share

解决方案


推荐阅读