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).
Solved! Go to Solution.
Set unique dialogId to parent dialog.
Set unique dialogId to parent dialog.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.