Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Force reload onAfterWrite


7 Posts   1572 Views


7 October 2010 at 6:01pm (Last edited: 7 October 2010 6:02pm), Community Member, 39 Posts

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.


7 October 2010 at 10:26pm Community Member, 271 Posts

You mean? :

LeftAndMain::ForceReload ();


7 October 2010 at 11:25pm Community Member, 39 Posts

Calling this inside a popup has no effect :(


8 October 2010 at 2:56am 4085 Posts

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:


8 October 2010 at 11:33am (Last edited: 8 October 2010 11:35am), Community Member, 39 Posts

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.


8 October 2010 at 10:33pm Community Member, 39 Posts

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.


5 October 2011 at 10:43am Community Member, 233 Posts

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...