[JSFIELD-12] Add changeValueAndSave action Created: 21/Jul/22  Updated: 16/Mar/23  Resolved: 03/Feb/23

Status: Closed
Project: Java Script UI (App and Dialog Fields)
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Bartosz Staryga Assignee: Adrien Manzoni
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

For dialog with only one property that uses complex iframes to choose the data to save in Magnolia user has to click twice to save:

  1. first time inside to iframe to chose the data to be passed to Magnolia
  2. second time to save and close the Magnolia dialog

Could we add new action type that can be sent from inside the iframe e.g. `changeValueAndSave`, which would result in changing the value and saving/closing the dialog?



 Comments   
Comment by Adrien Manzoni [ 03/Feb/23 ]

Unfortunately (and fortunately), Magnolia doesn't expose the dialog object from a bare form field. Therefore, it will be extremely complex to access the wrapping dialog and to trigger a close action.

Comment by Bartosz Staryga [ 06/Feb/23 ]

As workaround we can use the plain JS solution:
https://github.com/bartoszstaryga/DevDays-2022/blob/master/webresources/fieldScripts/dogFact.html#L69

Generated at Mon Feb 12 02:16:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.