popup.removePadding();
popup.addStyleName(I_LayoutBundle.INSTANCE.contentEditorCss().contentEditor());
popup.setGlassEnabled(true);
IFrame editorFrame = new IFrame(IFRAME_NAME, "");
popup.add(editorFrame);
final FormElement formElement = DomUtil.generateHiddenForm(dialogUri, Method.post, IFRAME_NAME, parameters);
RootPanel.getBodyElement().appendChild(formElement);
exportDialogFunctions(popup);
popup.addCloseHandler(new CloseHandler<PopupPanel>() {
public void onClose(CloseEvent<PopupPanel> event) {
formElement.removeFromParent();
removeExportedFunctions();
}
});
if (closeHandler != null) {
popup.addCloseHandler(closeHandler);
}
popup.center();
formElement.submit();
return popup;
}