private void remove() {
    if (getWindow() != null) {
      return;
    }

    ConfirmationModel model = new ConfirmationModel();
    setWindow(model);
    model.setTitle("Remove Network Interface(s)");
    model.setMessage("Network Interface(s)");

    java.util.ArrayList<String> items = new java.util.ArrayList<String>();
    for (Object item : getSelectedItems()) {
      VmNetworkInterface a = (VmNetworkInterface) item;
      items.add(a.getName());
    }
    model.setItems(items);

    UICommand tempVar = new UICommand("OnRemove", this);
    tempVar.setTitle("OK");
    tempVar.setIsDefault(true);
    model.getCommands().add(tempVar);
    UICommand tempVar2 = new UICommand("Cancel", this);
    tempVar2.setTitle("Cancel");
    tempVar2.setIsCancel(true);
    model.getCommands().add(tempVar2);
  }
  public void OnConfirmPMHost() {
    HostModel model = (HostModel) getWindow();

    if (!model.Validate()) {
      return;
    }

    if (!((Boolean) model.getIsPm().getEntity())) {
      ConfirmationModel confirmModel = new ConfirmationModel();
      setConfirmWindow(confirmModel);
      confirmModel.setTitle("Power Management Configuration");
      confirmModel.setHashName("power_management_configuration");
      confirmModel.setMessage(
          "You haven't configured Power Management for this Host. Are you sure you want to continue?");

      UICommand tempVar = new UICommand("OnAddHost", this);
      tempVar.setTitle("OK");
      tempVar.setIsDefault(true);
      confirmModel.getCommands().add(tempVar);
      UICommand tempVar2 = new UICommand("CancelConfirmWithFocus", this);
      tempVar2.setTitle("Cancel");
      tempVar2.setIsCancel(true);
      confirmModel.getCommands().add(tempVar2);
    } else {
      OnAddHost();
    }
  }