Project

General

Profile

« Previous | Next » 

Revision fd3565e6

Added by Katja Luther almost 5 years ago

fix #5687: matchmode needs to be BEGINNING for identifier search

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
95 95
	        String title, boolean multi, NamedArea namedArea, Object preferenceId, UUID... preselectedVocabularyUuids) {
96 96
		super(shell, //conversation,
97 97
		        title, multi, NamedAreaSelectionDialog.class.getCanonicalName(), namedArea);
98
		this.preferenceID = preferenceId;
98
//		this.preferenceID = preferenceId;
99 99
		preselectedVocabularies = new ArrayList<TermVocabulary>();
100 100
		for(int i=0;i<preselectedVocabularyUuids.length;i++){
101 101
			TermVocabulary preselectedVocabulary = CdmStore.getService(IVocabularyService.class).find(preselectedVocabularyUuids[i]);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java
62 62
        }else{
63 63

  
64 64
            if (isUseIdentifier()){
65
                List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.EXACT, limitOfInitialElements);
65
                List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.BEGINNING, limitOfInitialElements);
66 66
                if (model!= null){
67 67
                    model.clear();
68 68
                }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java
130 130
        if (isInReference && currentReference != null){
131 131

  
132 132
            if (isUseIdentifier()){
133
                List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.EXACT, limitOfInitialElements);
133
                List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.BEGINNING, limitOfInitialElements);
134 134
                if (model!= null){
135 135
                    model.clear();
136 136
                }
......
144 144

  
145 145
        }else{
146 146
            if (isUseIdentifier()){
147
                List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.EXACT, limitOfInitialElements);
147
                List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.BEGINNING, limitOfInitialElements);
148 148
                if (model!= null){
149 149
                    model.clear();
150 150
                }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SearchDialog.java
497 497
                        getList().getTable().setSelection(0);
498 498
                        getList().getTable().notifyListeners(SWT.Selection, new Event());
499 499
                    }
500
                    super.getButton(IDialogConstants.OK_ID).setEnabled(true);
500
                    if ( super.getButton(IDialogConstants.OK_ID) != null){
501
                        super.getButton(IDialogConstants.OK_ID).setEnabled(true);
502
                    }
501 503
                } else {
502 504
                    getList().setSelection(StructuredSelection.EMPTY);
503 505
                }

Also available in: Unified diff