When I close a dialog box in xpage I need it to refresh parent xpage. I use the dialog box to create a response document off the selected fields values on the dialog box. I use a Repeat on the parent xpage to show all the response documents (Dynamic Fields functionality). How do I refresh the parent xpage after the dialog box is closed?
I’m not sure how I should do this. Can someone please help.
Subject: I’m struggling with it too.
I used to use this JS in pre-XPage days, but haven’t got it to work in an XPage environment yet.
function rlDependentWindowOnUnloadReload()
{
if ( window.opener != null)
{
if ( typeof( window.opener.rlNotifyDependentWindowClosed) != "undefined") {
window.opener.rlNotifyDependentWindowClosed( window.name);
window.opener.parent.location.reload( true ) // refresh the page.
}
}
}
Subject: maybe you give it a try…
i have exactly the same problem.
What i’ll try as workarround - i’ll create a panel (div) to be display as an overlay. Normally hidden and shown when i press a button. So i will stay in the “parent” document but can get something looking like a popup.
That way it is easier to refresh the xpage, as i do not leave it.
Regards G.
Update: i tested this right now and it works like a charm. So this can be a workarround.
Subject: Can’t you do a partial refresh on the repeat control?
Subject: Search this forum…
- I found out how to do this right here. It has to do with triggering a partial refresh using one of the built-in client-side objects, but I don’t recall which one, and I don’t want to find it in my code because I know it’s just as easy for you to find it. If you can’t find it here, search the web. There are scads of blogs on XPages and I’m sure one of them has it. Just have your dialog do that partial refresh before you close it. Works a treat.
Hope this helps…