Ejemplo n.º 1
0
  @Override
  protected void onDeleteConfirmed(AjaxRequestTarget target, String selection) {
    iGenomicService.refreshDataSource(cpModel.getObject().getDataSource());
    String status = cpModel.getObject().getDataSource().getStatus();

    if (status != null
        && !(status.toLowerCase().startsWith("pro") || status.toLowerCase().startsWith("ready"))) {
      int count = iGenomicService.getDataSourceCount(cpModel.getObject().getDataSource().getId());
      if (count == 0) {
        iGenomicService.delete(cpModel.getObject().getDataSource());
        modalWindow.close(target);
      } else {
        this.error("Data Source is already attached to an analysis");
        target.add(feedBackPanel);
      }
    } else {
      this.error("Cannot delete online data source");
      target.add(feedBackPanel);
    }
  }
Ejemplo n.º 2
0
 @Override
 protected void onCancel(AjaxRequestTarget target) {
   modalWindow.close(target);
 }