Hi.
Is there any way of forcing CMS page reload, after saving DataObject in a popup?
I've got a DataObject that creates another object onAfterWrite. So I open a popup, click on 'save', and a new object is supposed to be added into another DOM (separate tab). But it doesn't show up until page reload, which is obvious.
I would like to force entire page reload when my object is successfully saved in a popup.
How do I do this?
Thx a lot.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
DataObjectManager Module /
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
Force reload onAfterWrite
You mean? :
LeftAndMain::ForceReload ();
Calling this inside a popup has no effect :(
Yeah, that won't work in a popup. I really can't think of any clean way to do this, to be honest. I'm sure with enough coding it's possible, but it would be pretty experimental.
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
Uncle Cheese, even most experimental really does work fine for me. I don't need it to be kosher, as the whole project is coded guerilla style. I just need to refresh the page no matter how, cause every other solution is worse than that.
Alright, I've been thinking about this - and what I exactly need to do, is to close the popup, reload tab being the parent, and all of its siblings.
For example, I have three tabs in Root.Content: tabA, tabB and tabC, each containing one DataObjectManager.
I open a popup in one of them, save an object, and inside its onAfterWrite I need to close the popup and reload tabs A,B,C.
just a following up on this? did anyone get this working?
i have a shopping system - if someone adds a an extra item to the orders list (using dataobjectmanager) i need to refresh the other tabs which have a summary of the total order amounts...
Cheers