docs: public void handleConfirmRemove(final CmsContainerPageElementPanel element) {
  
          if (element.isNew()) {
              element.removeFromParent();
              cleanUpContainers();
              setPageChanged();
              return;
          }
          checkElementReferences(element, new AsyncCallback<CmsRemovedElementStatus>() {
  
              public void onFailure(Throwable caught) {
  
                  // ignore, will never be executed
  
              }
  
              public void onSuccess(CmsRemovedElementStatus status) {
  
                  boolean showDeleteCheckbox = status.isDeletionCandidate();
                  ElementDeleteMode deleteMode = status.getElementDeleteMode();
                  if (deleteMode == null) {
                      deleteMode = getData().getDeleteMode();
                  }
                  CmsConfirmRemoveDialog removeDialog = new CmsConfirmRemoveDialog(
                      status.getElementInfo(),
                      showDeleteCheckbox,
                      deleteMode,
                      new AsyncCallback<Boolean>() {
  
                          public void onFailure(Throwable caught) {
  
                              element.removeHighlighting();
                          }
  
                          public void onSuccess(Boolean shouldDeleteResource) {
  
                              Runnable[] nextActions = new Runnable[] {};
  
                              if (shouldDeleteResource.booleanValue()) {
                                  final CmsRpcAction<Void> deleteAction = new CmsRpcAction<Void>() {
  
                                      @Override
                                      public void execute() {
  
                                          start(200, true);
  
                                          CmsUUID id = new CmsUUID(getServerId(element.getId()));
                                          CmsCoreProvider.getVfsService().deleteResource(id, this);
                                      }
  
                                      @Override
                                      public void onResponse(Void result) {
  
                                          stop(true);
                                      }
                                  };
                                  nextActions = new Runnable[] {new Runnable() {
  
                                      public void run() {
  
                                          deleteAction.execute();
                                      }
                                  }};
                              }
                              I_CmsDropContainer container = element.getParentTarget();
                              element.removeFromParent();
                              if (container instanceof CmsContainerPageContainer) {
                                  ((CmsContainerPageContainer)container).checkEmptyContainers();
                              }
                              cleanUpContainers();
                              setPageChanged(nextActions);
                          }
                      });
                  removeDialog.center();
              }
  
          });
      }