code: void onClickOk() {
  
          CmsContainerPageCopier copier = new CmsContainerPageCopier(m_context.getCms());
          try {
              CmsContainerPageCopier.CopyMode mode = (CmsContainerPageCopier.CopyMode)(m_copyMode.getValue());
              copier.setCopyMode(mode);
              TargetInfo info = new TargetInfo(m_context.getCms(), m_targetSelect.getValue());
              if (!info.isValid()) {
                  Type type = Type.ERROR_MESSAGE;
                  String error = CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_INVALID_TARGET_0);
                  Notification.show(error, type);
                  return;
              }
              CmsResource targetFolder = info.getTargetFolder();
              copier.run(m_context.getResources().get(0), targetFolder, info.getTargetName());
              m_context.finish(
                  Arrays.asList(
                      copier.getTargetFolder().getStructureId(),
                      copier.getCopiedFolderOrPage().getStructureId()));
          } catch (CmsException e) {
              m_context.error(e);
          } catch (NoCustomReplacementException e) {
              String errorMessage = CmsVaadinUtils.getMessageText(
                  Messages.GUI_COPYPAGE_NO_REPLACEMENT_FOUND_1,
                  e.getResource().getRootPath());
              CmsErrorDialog.showErrorDialog(errorMessage, e);
          }
      }
docs: Method that is called when the OK button is clicked.<p>