[MGNLUI-5459] Provide dialog callback API in a similar fashion like it was done in m5-ui Created: 30/Oct/19  Updated: 08/Dec/20  Resolved: 08/Dec/20

Status: Closed
Project: Magnolia UI
Component/s: dialogs
Affects Version/s: 6.1.3
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Aleksandr Pchelintcev Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: UI framework: forms, dialogs, content editing
Story Points: 5

 Description   

Timebox for investigation: 5 SP

In m5 dialogs it it possible to provide a callback to the dialog and execute certain logic when the dialog is closed (via commit action or cancellation).

This appears to be handy when one needs to e.g. do additional persistency operations or update some other views/apps.



 Comments   
Comment by Roman Kovařík [ 18/Nov/19 ]

For the time being, you can extend info.magnolia.ui.dialog.actions.OpenDialogAction#getCloseHandler and provide a custom close handler.

Comment by Roman Kovařík [ 04/Feb/20 ]

ilgun efochr could we list the addons use cases (e.g. the old framework implementations in addons if there are some)?
This search doesn't show many https://git.magnolia-cms.com/plugins/servlet/search?q=project%3AADDON%20editorcallback.

Comment by Roman Kovařík [ 07/Feb/20 ]

Looks like a custom app/action...doesn't extending that action do the trick?
I can see a possible use case just in pages app (there you cannot provide a custom action to component dialogs).

Generated at Mon Feb 12 09:26:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.