Project

General

Profile

« Previous | Next » 

Revision bcf8e025

Added by Katja Luther over 6 years ago

save only dirty elements of the bulkeditor

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
208 208
	    conversation.commit(true);
209 209

  
210 210
	    Object object = viewer.getInput();
211
	    List<CdmBase> cdmBaseList = new ArrayList<>();;
212
	    if(object instanceof List){
213
	        for (Object item: (List)object) {
214
	            CdmBase cdmBase = (CdmBase) item;
215
	            cdmBaseList.add(cdmBase);
216
            }
217
	    }
211
	    List<CdmBase> cdmBaseList = new ArrayList<>();
212
	    List<CdmBase> saveCandidates = getEditorInput().getSaveCandidates();
213
//	    if(saveCandidates != null && !saveCandidates.isEmpty()){
214
//	        for (CdmBase item: saveCandidates) {
215
//
216
//	            cdmBaseList.add(item);
217
//            }
218
//	    }
218 219
	    if (!cdmBaseList.isEmpty()){
219
	        CdmStore.getService(cdmBaseList.get(0)).merge(cdmBaseList, true);
220
	        CdmStore.getService(saveCandidates.get(0)).merge(saveCandidates, true);
220 221
	    }
221 222
        dirty.setDirty(false);
222 223
        viewer.refresh();
......
295 296
     */
296 297
    @Override
297 298
    public void changed(Object element) {
299
        if (element instanceof CdmBase) {
300
            getEditorInput().addSaveCandidate((CdmBase)element);
301
        }
298 302
        dirty.setDirty(true);
299 303
    }
300 304

  

Also available in: Unified diff