We stumbled upon a request regarding parent-child pages, which sounded like this: I have a parent page which opens a child page. When I add or update a record, I want to close the child page and refresh the parent page.
If you have a scenario where you use the “FOEX Window Open” dynamic action to load another page into the window (rather than defining a window region plugin on the same page) and wish to refresh a calling grid which is on the same page as the “FOEX Window Open” dynamic action, then you need to perform the following steps.
Note: While the examples provided below are on APEX 4.2 , the design setup is done similarly in APEX 5.0 using the page designer.
1. Provide a static ID for your grid (e.g. PR9001_GRID)
2. Provide an ID for your window when opening (see image below)
3. On the page that is opened within the window (e.g. page 25 in FDOCS), create an action on e.g. “Form CRUD Success” event and choose the “FOEX Grid Refresh Rows” action followed by a window close using a jQuery selector for both.
Alternatively, you could refresh the entire region using the “FOEX Actions” dynamic action, choose the “Refresh” action and set the “Refresh Affected Elements on Parent Pages?” to “Yes”, as seen below:
Since we use a jQuery selector to locate the grid, we can reuse this page and it can be opened by different parent pages, as multiple regions can be included (e.g. #PR9000_GRID,#PR9001_GRID). The action will only refresh the regions it can find.
Tip: Remember to always set “Window Close” as the last action to be performed.
Looking to build large-scale web applications fast? Sign up and start developing with FOEX!