code: public void setContentToDialog(String caption, CmsBasicDialog dialog) {
  
          setContent(new Label());
          Window window = CmsBasicDialog.prepareWindow(DialogWidth.narrow);
          window.setContent(dialog);
          window.setCaption(caption);
          window.setClosable(false);
          addWindow(window);
          window.center();
      }
docs: Replaces the ui content with a single dialog.<p>
  
  @param caption the caption
  @param dialog the dialog content