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?
Partial refresh on the repeat control does not work.
I have to close the parent document and reopen it in order to see the updates.
I’m not sure how I should do this. Can someone please help.
Subject: Put the repeat in a panel?..
- That’s been mentioned as a solution here on the forum many times, for various things. I used it get a table to partial refresh. Ach. Forgot to mention once the repeat is in the panel, it’s the panel you do the partial refresh on, not the repeat.
Hope this helps…
Subject: Is there a way to redirect the parent page from a dialog box?
I tried partial refresh, on the Panel, Table, and Repeat. But I can’t get the new data to show in the repeat, unless I close the document and reopen it.
//-----Here is the Repeat Code I use to get the Responses of the Parent document-------
if(@IsNewDoc()!=1){
db=database;
noteid=projectDoc.getNoteID();
doc=db.getDocumentByID(noteid);
respDocs=doc.getResponses();
if (respDocs!=null){
docIds="";
doc = respDocs.getFirstDocument();
while(doc != null) {
FormName = doc.getItemValueString("Form");
if (FormName=="task")
{
docIds=docIds+doc.getNoteID()+";";
}
doc = respDocs.getNextDocument();
}
return @Explode(docIds,";");
}
}
//-----------------------------------------
Is there a way to redirect the parent page from a dialog box (like on a close event)?
I get an error if I add this SSJ to the end of my code on the dialog box action button.
var url=view.getPageName()+“?action=editDocument&documentId=”+projectDoc.getNoteID();
context.redirectToPage(url);