Problem with nested dialog in aikau

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
npavlov
Active Member II

Problem with nested dialog in aikau

Jump to solution

Hi!

Clicking on the menu item opens a dialog. In this dialog there is a button ("Show sub dialog") that publishes the topic:

{
    name: "alfresco/menus/AlfMenuBarItem",
    config: {
        additionalCssClasses: "mediumpad",
        label:"Test",
        publishTopic: "ALF_CREATE_DIALOG_REQUEST",
        publishPayload: {
            dialogTitle: "Test dialog",
            cancelPublishTopic:"ALF_DIALOG_MOVE_STOP_CLOSE",
            widgetsButtons:[
                {
                    name: "alfresco/buttons/AlfButton",
                    config: {
                        label: "close",
                        publishTopic: "ALF_DIALOG_MOVE_STOP_CLOSE"

                    }

                }
            ],
            fixedWidth: true,
            widgetsContent: [
                {
                    name: "alfresco/buttons/AlfButton",
                    config: {
                        label: "Show sub dialog",
                        publishTopic: "MY_TOPIC_SHOW DIALOG",
                        publishPayload: {
                            examplePayload: ""
                        }

                    }
                }
            ]
        }
    }
}

In the function associated with the topic, a dialog is created to confirm the requested action.

requestSubDialog: function example__requestSubDialog(payload) {
    this.alfServicePublish(topics.CREATE_DIALOG, {
        dialogId: "ALF_CRUD_SERVICE_DELETE_CONFIRMATION_DIALOG",
        dialogTitle: "Dialog title",
        textContent: "Are you sure you want to do that?",
        widgetsButtons: [
            {
                id: "ALF_CRUD_SERVICE_DELETE_CONFIRMATION_DIALOG_CONFIRM",
                name: "alfresco/buttons/AlfButton",
                config: {
                    label: "Yes",
                    publishTopic: "MY_TOPIC_DO",
                    publishPayload: {
                       examplePayload:""
                    }

                }
            },
            {
                id: "ALF_CRUD_SERVICE_DELETE_CONFIRMATION_DIALOG_CANCEL",
                name: "alfresco/buttons/AlfButton",
                config: {
                    label: "No",
                    publishTopic: ""
                }

            }
        ]
    });
}

When the button (in the parent dialog) is pressed for the first time (after reloading the page), the child dialog is opened, but the parent dialog disappears (иге I do not want it to close).
When you re-enter the parent dialog (without reloading the page), everything works as expected: when the button is clicked, the child dialog opens over the parent (after the child is closed, we still see the parent).

1 Solution

Accepted Solutions
npavlov
Active Member II

Re: Problem with nested dialog in aikau

Jump to solution

Set unique dialogId to parent dialog.

1 Reply
npavlov
Active Member II

Re: Problem with nested dialog in aikau

Jump to solution

Set unique dialogId to parent dialog.