Project

General

Profile

Revision 7a5312a7

ID7a5312a74bf21064c914e9474ae385d076ad7ab0
Parent 6ffb5f98
Child d3a37851

Added by Andreas Kohlbecker about 1 year ago

ref #8215 using match mode BEGINNING for all AgentBase paging providers, also centralizing the construction

View differences:

src/main/java/eu/etaxonomy/cdm/service/CdmFilterablePagingProviderFactory.java
19 19

  
20 20
import eu.etaxonomy.cdm.api.application.CdmRepository;
21 21
import eu.etaxonomy.cdm.format.ReferenceEllypsisFormatter;
22
import eu.etaxonomy.cdm.model.agent.AgentBase;
23
import eu.etaxonomy.cdm.model.agent.Person;
24
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
22 25
import eu.etaxonomy.cdm.model.name.TaxonName;
23 26
import eu.etaxonomy.cdm.model.reference.Reference;
24 27
import eu.etaxonomy.cdm.model.reference.ReferenceType;
......
105 108
        return pagingProvider;
106 109
    }
107 110

  
111
    public CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> teamOrPersonPagingProvider() {
112
        return  new CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase>(repo.getAgentService(), TeamOrPersonBase.class, MatchMode.BEGINNING, OrderHint.ORDER_BY_TITLE_CACHE.asList());
113
    }
114

  
115
    public CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider() {
116
        return new CdmFilterablePagingProvider<AgentBase, Person>(repo.getAgentService(), Person.class, MatchMode.BEGINNING, OrderHint.ORDER_BY_TITLE_CACHE.asList());
117
    }
118

  
108 119
}
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/SpecimenTypeDesignationWorkingsetEditorPresenter.java
178 178

  
179 179
        getView().getCountrySelectField().setContainerDataSource(cdmBeanItemContainerFactory.buildBeanItemContainer(Country.uuidCountryVocabulary));
180 180

  
181
        CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> termOrPersonPagingProvider = new CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase>(getRepo().getAgentService(), TeamOrPersonBase.class);
182
        CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = new CdmFilterablePagingProvider<AgentBase, Person>(getRepo().getAgentService(), Person.class);
181
        CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> termOrPersonPagingProvider = pagingProviderFactory.teamOrPersonPagingProvider();
182
        CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = pagingProviderFactory.personPagingProvider();
183 183
        termOrPersonPagingProvider.setInitStrategy(AgentBaseInit.TEAM_OR_PERSON_INIT_STRATEGY);
184 184
        // the ToOneRelatedEntityReloader is added internally in the TeamOrPersonField:
185 185
        getView().getCollectorField().setFilterablePersonPagingProvider(personPagingProvider, this);
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
125 125
        getView().getRankSelect().setContainerDataSource(cdmBeanItemContainerFactory.buildBeanItemContainer(TermType.Rank));
126 126
        getView().getRankSelect().setItemCaptionPropertyId("label");
127 127

  
128
        CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> termOrPersonPagingProvider = new CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase>(getRepo().getAgentService(), TeamOrPersonBase.class);
128
        CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> termOrPersonPagingProvider = pagingProviderFactory.teamOrPersonPagingProvider();
129 129
        termOrPersonPagingProvider.setInitStrategy(AgentBaseInit.TEAM_OR_PERSON_INIT_STRATEGY);
130
        CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = new CdmFilterablePagingProvider<AgentBase, Person>(getRepo().getAgentService(), Person.class);
130
        CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = pagingProviderFactory.personPagingProvider();
131 131

  
132 132
        getView().getCombinationAuthorshipField().setFilterableTeamPagingProvider(termOrPersonPagingProvider, this);
133 133
        getView().getCombinationAuthorshipField().setFilterablePersonPagingProvider(personPagingProvider, this);
src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferenceEditorPresenter.java
99 99
        getView().getInReferenceCombobox().getSelect().addValueChangeListener(new ToOneRelatedEntityReloader<Reference>(getView().getInReferenceCombobox(),this));
100 100
        getView().getInReferenceCombobox().getSelect().setCaptionGenerator(new ReferenceEllypsisCaptionGenerator(LabelType.BIBLIOGRAPHIC, getView().getInReferenceCombobox().getSelect()));
101 101

  
102
        CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> teamOrPersonPagingProvider = new CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase>(getRepo().getAgentService(), TeamOrPersonBase.class);
103
        CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = new CdmFilterablePagingProvider<AgentBase, Person>(getRepo().getAgentService(), Person.class);
102
        CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> teamOrPersonPagingProvider = pagingProviderFactory.teamOrPersonPagingProvider();
103
        CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = pagingProviderFactory.personPagingProvider();
104 104
        getView().getAuthorshipField().setFilterableTeamPagingProvider(teamOrPersonPagingProvider, this);
105 105
        getView().getAuthorshipField().setFilterablePersonPagingProvider(personPagingProvider, this);
106 106

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)