Skip to content

Commit

Permalink
Add a method tu refresh the ModalDialog by replacing the content with…
Browse files Browse the repository at this point in the history
… a new component.
  • Loading branch information
spelletier committed Jan 7, 2016
1 parent f90b44d commit 5fac48d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Frameworks/Ajax/Ajax/Sources/er/ajax/AjaxModalDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,19 @@ public static void update(WOContext context, String title) {
AjaxUtils.setPageReplacementCacheKey(context, currentDialog._containerID(context));
}

/**
* Call this method to have a JavaScript response returned that updates the contents of the modal dialog.
*
* @param context the current WOContext
* @param newContent the new content for the updated dialog
* @param title optional new title for the updated dialog
*/
public static void update(WOContext context, WOComponent newContent, String title) {
AjaxModalDialog currentDialog = currentDialog(context);
currentDialog._actionResults = newContent;
update(context, title);
}

/**
* Call this method to have a JavaScript response returned that updates the contents of the modal dialog
* without updating the title.
Expand Down

0 comments on commit 5fac48d

Please sign in to comment.