05-29-2018 11:02 AM
Hi,
I create dialog by publishing "ALF_CREATE_DIALOG_REQUEST" Topic. After close the dialog I want to do some action. Now I use ALF_DIALOG_MOVE_STOP to track that event. But this event occurs also when moving dialog window. But I need my action to start only after closing dialog window.
05-30-2018 10:41 AM
Why would you want to do that? Unless the user clicks ok, why would you do anything at all?
But no worries, the DialogService supports configuration of a cancelPublishTopic which is triggered when the dialog is cancelled via the close button.
Please check the Aikau JSDoc for widget and service details, as well as examples. And also check the tutorials.
05-30-2018 06:52 AM
When you submit your publication to ALF_CREATE_DIALOG_REQUEST, you need to include in the payload of the publication the necessary widgets to handle any "OK" or "Submit" actions, i.e. buttons which themselves send the appropriate publication that then triggers your intended action in the service registered to that publication topic. Ideally, you should never think in the callback-heavy "onXY" way, only in the message-based communication way...
05-30-2018 07:43 AM
Thanks for the comment. And how to track the user clicking the close button in the upper right corner of the dialog?
05-30-2018 10:41 AM
Why would you want to do that? Unless the user clicks ok, why would you do anything at all?
But no worries, the DialogService supports configuration of a cancelPublishTopic which is triggered when the dialog is cancelled via the close button.
Please check the Aikau JSDoc for widget and service details, as well as examples. And also check the tutorials.
05-30-2018 11:05 AM
Thanks for cancelPublishTopic, I thought that it only applies to the Cancel button in the dialog window. I have a data update tied to the closing of the dialog box, and not to what the user does in the dialog box.
Explore our Alfresco products with the links below. Use labels to filter content by product module.