Keep app detail view open after save

27 views
Skip to first unread message

Christoph Damm

unread,
Jan 22, 2024, 11:16:30 AMJan 22
to Magnolia User Mailing List
Hi,

I am having the requirement to keep a details view of an app open after clicking the save button (instead of closing it and selecting the edited/created item within the browser app).
Is there anything built in that could be used or adapted or did anyone having the same requirement?
Currently I have our own SaveDetailSubAppAction which would stay on the details app. However, especially with multifields i have weird state issues that cause errors when saving more than one value after each other. I might be able to provide more detailed about that later on.

Just was wondering if anybody faced something similiar before.

Thanks and regards

Christoph

Roman Kovařík

unread,
Jan 23, 2024, 2:35:17 AMJan 23
to Magnolia User Mailing List, christo...@gmail.com
Hey Christoph,

Have you tried closing and reopening the subApp (if you don't need to retain the scroll state)?
I'd try extending the close action which would:
  • store the current location from LocationController, 
  • call super to close the subApp
  • call LocationController to return to the subApp
Let us know how it goes
Roman

Christoph Damm

unread,
Jan 23, 2024, 5:55:39 AMJan 23
to Roman Kovařík, Magnolia User Mailing List
Hi Roman,
technically this works (actually i was extending the ComitAction, which extends the CloseAction but had bound the closehandler to do nothing).
However, of course, as you say, now the tab and or scroll position is lost.
Which is not great from a user perspective. Any idea how i could regain that state?
Fyi: the state issues i mentioned earlier are in multifields and the reordering of nodes (which i need).

Thanks and regards
Christoph

Roman Kovařík

unread,
Jan 23, 2024, 9:30:47 AMJan 23
to Magnolia User Mailing List, christo...@gmail.com, Magnolia User Mailing List, Roman Kovařík
Hi again,

any chance calling 
form.populate(valueContext.getSingleOrThrow());
to reinitialise the form would fix the issue?
 
Hope that helps
Roman

On Tuesday, January 23, 2024 at 11:55:39 AM UTC+1 christo...@gmail.com wrote:
Hi Roman,
technically this works (actually i was extending the ComitAction, which extends the CloseAction but had bound the closehandler to do nothing).
However, of course, as you say, now the tab and or scroll position is lost.
Which is not great from a user perspective. Any idea how i could regain that state?
Fyi: the state issues i mentioned earlier are in multifields and the reordering of nodes (which i need).

Thanks and regards
Christoph

Christoph Damm

unread,
Jan 23, 2024, 10:52:34 AMJan 23
to Roman Kovařík, Magnolia User Mailing List
Hey Roman,
yes, that fixes the issue as i would expect it!
Thank you so much, i owe you :-)

Regards,

Christoph

On Tue, 23 Jan 2024 at 15:30, Roman Kovařík <roman....@magnolia-cms.com> wrote:
Hi again,

any chance calling 
form.populate(valueContext.getSingleOrThrow());
to reinitialise the form would fix the issue?
 
Hope that helps
Roman

On Tuesday, January 23, 2024 at 11:55:39 AM UTC+1 christo...@gmail.com wrote:
Hi Roman,
technically this works (actually i was extending the ComitAction, which extends the CloseAction but had bound the closehandler to do nothing).
However, of course, as you say, now the tab and or scroll position is lost.
Which is not great from a user perspective. Any idea how i could regain that state?
Fyi: the state issues i mentioned earlier are in multifields and the reordering of nodes (which i need).

Thanks and regards
Christoph

Reply all
Reply to author
Forward
0 new messages