TaxonNodeDto parentDto = CdmStore.getService(ITaxonNodeService.class).findCommonParentDto(nodeDtos);
UUID taxonUuid = parentDto.getTaxonUuid();
- int response = MessagingUtils.confirmDialog(
+ int response = 0;
+ if (parentDto == null){
+ response = MessagingUtils.confirmDialog(
+ "Choose taxonomic scope",
+ "There is no common parent taxon for this dataset is:\n\n"
+ + "Do you want to choose the taxonomic scope for the polytomous key?"
+ , "Choose taxon", "Cancel");
+ response++;
+ }else{
+ response = MessagingUtils.confirmDialog(
"Choose taxonomic scope",
String.format("The common parent taxon of this dataset is :\n%s\n\n"
+ "Do you want to use this as the taxonomic scope for the polytomous key?"
, parentDto.getTaxonTitleCache()), "Yes", "Choose different taxon", "Cancel");
+ }
if(response==2){
return;
}