Class PositionBasedSorter

java.lang.Object
ch.tocco.nice2.model.form.spi.PositionBasedSorter

@Deprecated public final class PositionBasedSorter extends Object
Deprecated.
Sorts all components based on the Component.Position.

So the first priority are the categories like Component.Position.TOP, Component.Position.MIDDLE, Component.Position.BOTTOM. So the components are sorted in those three zones. After this the 'relative'-positions like Component.Position.BEFORE, Component.Position.AFTER, are applied.

This sorting always is applied to all components of the same level on the component-tree. The sorting is done after all configration-files are read. The sorting is important to set the position of components when extending a form.

 Example:
 - DetailForm
 -- name: Top
 -- address: Middel
 -- firstname: Top
 -- city: After:address
 -- email: After:name
 -- phone: Bottom
 will be sorted to:
 - DetailForm
 -- name
 -- email
 -- firstname
 -- address
 -- City
 -- Phone