I did find that Andy Power offers a solution at http://andypowell.org/category/cq5/
Here is the listener function:
function(path, definition) { var dialogConfig = CQ.WCM.getDialogConfig(definition.dialog); dialogConfig.success = function(form, action){ CQ.Util.reload(CQ.WCM.getContentWindow()); }; dialogConfig.failure = function(form, action){ var resp = CQ.HTTP.buildPostResponseFromHTML(action.response); CQ.Ext.Msg.alert(response.headers[CQ.HTTP.HEADER_MESSAGE]); }; var dialog = CQ.WCM.getDialog(dialogConfig); dialog.loadContent(path); dialog.show(); }
Two issues:
- The dialog title is a JCR path and not friendly
- The dialog is modal. We need it inline.
Any thoughts on how to make the actual dialog editConfig properties work with this function?