Project

General

Profile

« Previous | Next » 

Revision fdce845e

Added by Andreas Kohlbecker about 5 years ago

fix #8063 avoiding multiple representations problem by adding the the citation to the cache in case the registration is empty

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/name/SpecimenTypeDesignationWorkingsetEditorPresenter.java
155 155
                // create a new workingset, for a new fieldunit which is the base for the workingset
156 156
                workingSetDto = specimenTypeDesignationWorkingSetService.create(idset.registrationUuid, idset.publicationUuid, idset.typifiedNameUuid);
157 157
                // need to use load but put see #7214
158
                cache.load(workingSetDto.getOwner());
158
                Registration registration = workingSetDto.getOwner();
159
                cache.load(registration);
160
                if(registration.getName() == null && (registration.getTypeDesignations() == null || registration.getTypeDesignations().isEmpty())){
161
                    // need to add the citation to the cache when there is no name or typedesignation in the registry which would bring the citation otherwise.
162
                    cache.load(workingSetDto.getCitation());
163
                }
159 164
                cache.load(workingSetDto.getTypifiedName());
160 165
                rootEntities.add(workingSetDto.getOwner());
166
                rootEntities.add(workingSetDto.getTypifiedName());
167
                rootEntities.add(workingSetDto.getCitation());
161 168
            }
162 169

  
163 170
        } else {
......
181 188
        CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> termOrPersonPagingProvider = new CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase>(getRepo().getAgentService(), TeamOrPersonBase.class);
182 189
        CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = new CdmFilterablePagingProvider<AgentBase, Person>(getRepo().getAgentService(), Person.class);
183 190
        termOrPersonPagingProvider.setInitStrategy(AgentBaseInit.TEAM_OR_PERSON_INIT_STRATEGY);
191
        // the ToOneRelatedEntityReloader is added internally in the TeamOrPersonField:
184 192
        getView().getCollectorField().setFilterablePersonPagingProvider(personPagingProvider, this);
185 193
        getView().getCollectorField().setFilterableTeamPagingProvider(termOrPersonPagingProvider, this);
186 194

  

Also available in: Unified diff