Source:
protected void restore() { super.restore(); if (getWindow() != null) { return; } ArchitectureType firstArch = null; boolean multipleArchs = false; for (Object item : getSelectedItems()) { ArchitectureType arch = getArchitectureFromItem(item); if (firstArch == null) { firstArch = arch; } else { if (!firstArch.equals(arch)) { multipleArchs = true; } } } if (multipleArchs) { ConfirmationModel confirmModel = new ConfirmationModel(); setConfirmWindow(confirmModel); confirmModel.setTitle(ConstantsManager.getInstance().getConstants().invalidImportTitle()); confirmModel.setHashName("multiple_archs_dialog"); confirmModel.setMessage(ConstantsManager.getInstance().getConstants().invalidImportMsg()); UICommand command = new UICommand("multipleArchsOK", this); command.setTitle(ConstantsManager.getInstance().getConstants().ok()); command.setIsDefault(true); confirmModel.getCommands().add(command); setConfirmWindow(confirmModel); return; } ImportVmModel model = getImportModel(); setWindow(model); model.startProgress(null); UICommand restoreCommand; restoreCommand = new UICommand("OnRestore", this); restoreCommand.setTitle(ConstantsManager.getInstance().getConstants().ok()); restoreCommand.setIsDefault(true); model.getCommands().add(restoreCommand); UICommand tempVar3 = new UICommand("Cancel", this); tempVar3.setTitle(ConstantsManager.getInstance().getConstants().cancel()); tempVar3.setIsCancel(true); model.getCommands().add(tempVar3); model.setItems(getSelectedItems()); model.init(getEntity().getId()); model.setTargetArchitecture(firstArch); UICommand closeCommand = new UICommand("Cancel", this); closeCommand.setTitle(ConstantsManager.getInstance().getConstants().close()); closeCommand.setIsDefault(true); closeCommand.setIsCancel(true); model.setCloseCommand(closeCommand); }

Target:
protected void restore() { super.restore(); if (getWindow() != null) { return; } ArchitectureType firstArch = null; boolean multipleArchs = false; for (Object item : getSelectedItems()) { ArchitectureType arch = getArchitectureFromItem(item); if (firstArch == null) { firstArch = arch; } else { if (!firstArch.equals(arch)) { multipleArchs = true; break; } } } if (multipleArchs) { ConfirmationModel confirmModel = new ConfirmationModel(); setConfirmWindow(confirmModel); confirmModel.setTitle(ConstantsManager.getInstance().getConstants().invalidImportTitle()); confirmModel.setHashName("multiple_archs_dialog"); confirmModel.setMessage(ConstantsManager.getInstance().getConstants().invalidImportMsg()); UICommand command = new UICommand("multipleArchsOK", this); command.setTitle(ConstantsManager.getInstance().getConstants().ok()); command.setIsDefault(true); confirmModel.getCommands().add(command); setConfirmWindow(confirmModel); return; } ImportVmModel model = getImportModel(); setWindow(model); model.startProgress(null); UICommand restoreCommand; restoreCommand = new UICommand("OnRestore", this); restoreCommand.setTitle(ConstantsManager.getInstance().getConstants().ok()); restoreCommand.setIsDefault(true); model.getCommands().add(restoreCommand); UICommand tempVar3 = new UICommand("Cancel", this); tempVar3.setTitle(ConstantsManager.getInstance().getConstants().cancel()); tempVar3.setIsCancel(true); model.getCommands().add(tempVar3); model.setItems(getSelectedItems()); model.init(getEntity().getId()); model.setTargetArchitecture(firstArch); UICommand closeCommand = new UICommand("Cancel", this); closeCommand.setTitle(ConstantsManager.getInstance().getConstants().close()); closeCommand.setIsDefault(true); closeCommand.setIsCancel(true); model.setCloseCommand(closeCommand); }