Project

General

Profile

« Previous | Next » 

Revision b7fa95c6

Added by Katja Luther over 6 years ago

ref #7136: reload objects after deduplication

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.bulkeditor.e4;
11 11

  
12
import java.util.ArrayList;
13 12
import java.util.List;
14 13

  
15 14
import javax.annotation.PostConstruct;
......
86 85
    @Inject
87 86
    private MPart thisPart;
88 87

  
88
    private BulkEditorQuery lastQuery = null;
89

  
89 90
    @Inject
90 91
    public BulkEditorE4() {
91 92
	}
......
203 204
	}
204 205

  
205 206
	public void save(IProgressMonitor monitor, boolean resetMerge) {
207

  
206 208
	    input.saveModel(resetMerge);
207 209

  
208 210
	    // commit the conversation and start a new transaction immediately
209 211
	    conversation.commit(true);
210 212

  
211 213
	    Object object = viewer.getInput();
212
	    List<CdmBase> cdmBaseList = new ArrayList<>();
213 214
	    List<CdmBase> saveCandidates = getEditorInput().getSaveCandidates();
214
	    if(saveCandidates != null && !saveCandidates.isEmpty()){
215
	        for (CdmBase item: saveCandidates) {
216

  
217
	            cdmBaseList.add(item);
218
            }
219
	    }
220 215

  
221 216
	    if (!saveCandidates.isEmpty()){
222 217
	        CdmStore.getService(saveCandidates.get(0)).merge(saveCandidates, true);
223 218
	    }
224 219
        dirty.setDirty(false);
225 220
        getEditorInput().resetSaveCandidates();
221

  
222
        if (lastQuery != null){
223
            performSearch(lastQuery);
224
        }
226 225
        viewer.refresh();
227 226

  
227

  
228 228
	}
229 229

  
230 230
	/** {@inheritDoc} */
......
246 246
//            getEditorInput().dispose();
247 247
//            getEditorInput().bind();
248 248
            getEditorInput().performSearch(query);
249

  
249
            lastQuery = query;
250 250
            viewer.setInput(getEditorInput().getModel());
251 251
            refresh();
252 252
        }
......
337 337
        return conversation;
338 338
    }
339 339

  
340
    /**
341
     * @return
342
     */
343
    public BulkEditorQuery getLastQuery() {
344
       return lastQuery;
345
    }
346

  
347
    /**
348
     * @param object
349
     */
350
    public void setLastQuery(BulkEditorQuery lastQuery) {
351
       this.lastQuery = lastQuery;
352

  
353
    }
354

  
340 355
}

Also available in: Unified diff