Project

General

Profile

« Previous | Next » 

Revision 508b8f01

Added by Andreas Kohlbecker about 3 years ago

ref #9290 NameTypeDesignationEditor now using designation reference correctly

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
567 567
            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
568 568
            popup.withDeleteButton(true);
569 569
            popup.loadInEditor(new TypeDesignationWorkingsetEditorIdSet(event.getRegistrationUuid(), event.getBaseEntityRef()));
570

  
571
            popup.getCitationCombobox().setEnabled(false);
572 570
            popup.getTypifiedNamesComboboxSelect().setEnabled(false);
573

  
574 571
            if(event.hasSource()){
575 572
                // propagate readonly state from source button to popup
576 573
                popup.setReadOnly(event.getSource().isReadOnly());
......
619 616
            NameTypeDesignationPopupEditor popup = openPopupEditor(NameTypeDesignationPopupEditor.class, event);
620 617
            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
621 618
            popup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
622
            RegistrationDTO regDto = workingset.getRegistrationDTO(event.getRegistrationUuid()).get();
623
            Reference citation = regDto.getCitation();
624 619
            nameTypeDesignationPopupEditorRegistrationUUIDMap.put(popup, event.getRegistrationUuid());
625 620
            popup.setBeanInstantiator(new BeanInstantiator<NameTypeDesignation>() {
626 621

  
......
629 624

  
630 625
                    TaxonName typifiedName = getRepo().getNameService().load(event.getTypifiedNameUuid(), Arrays.asList(new String[]{"typeDesignations", "homotypicalGroup"}));
631 626
                    NameTypeDesignation nameTypeDesignation  = NameTypeDesignation.NewInstance();
632
                    nameTypeDesignation.setCitation(citation);
633 627
                    nameTypeDesignation.getTypifiedNames().add(typifiedName);
634 628
                    return nameTypeDesignation;
635 629
                }
636 630
            });
637 631
            popup.withDeleteButton(false);
638 632
            popup.loadInEditor(null);
639
            popup.getCitationCombobox().setEnabled(false);
640 633
            popup.getTypifiedNamesComboboxSelect().setEnabled(false);
641 634
            if(event.hasSource()){
642 635
                // propagate readonly state from source component to popup

Also available in: Unified diff