Jump to:

23456 Posts in 18905 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Reloading specific tab or entire page from popup level

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 848 Views
  • k0m0r
    Community Member
    39 Posts

    Reloading specific tab or entire page from popup level Link to this post

    This is a cross-post from the DOM forum, but I realized it's not really a matter of DOM.

    I have a DataObject, that creates another object and deletes itself in onAfterWrite().
    I bumped into two issues:
    1. As the new object is added to another tab, this tab is not being refreshed and the created object is not shown until page/tab reload.
    2. After saving DataObject, the popup reloads and tries to load data of the object that no longer exists, so it ends up with error.

    The easiest solution would be to just reload the entire page in onAfterWrite(). But LeftAndMain::ForceReload() does not work from inside a popup. Is there a way to achieve this?

    If this cannot be done, I would like to:
    1. Refresh a specific tab at currently opened page (by its name), or refresh current tab AND its siblings (both ways acceptable).
    2. Close a popup in onAfterWrite() to prevent loading the DataObject that doesn't exist.

    Thx a lot for any hints.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.