Project

General

Profile

« Previous | Next » 

Revision 1c3cb06b

Added by Patrick Plitzner about 6 years ago

fix #6330 Add default sorting for all entity collections

  • default sorting is done by CdmBase.getId(). This also ensures that new elements are shown on top at first

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartSection.java
2 2
package eu.etaxonomy.taxeditor.ui.section.media;
3 3

  
4 4
import java.util.Collection;
5
import java.util.Comparator;
5 6

  
6 7
import org.eclipse.jface.util.PropertyChangeEvent;
7 8

  
......
13 14
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
14 15
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
15 16
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
17
import eu.etaxonomy.taxeditor.ui.section.DefaultCdmBaseComparator;
16 18

  
17 19
/**
18 20
 * <p>MediaRepresentationPartSection class.</p>
......
57 59
		return getEntity().getParts();
58 60
	}
59 61

  
62
	@Override
63
	public Comparator<MediaRepresentationPart> getComparator() {
64
        return new DefaultCdmBaseComparator<>();
65
	}
66

  
60 67
	/** {@inheritDoc} */
61 68
	@Override
62 69
	public String getEmptyString() {

Also available in: Unified diff