Commit 0ca8add9 authored by Bert Leunis's avatar Bert Leunis Committed by Jasper Floor

HIPPLUG-1574 apply sorting also when instance already exists

    (cherry picked from commit 09aeeb48)
parent fe53e1c6
/*
* Copyright 2011-2013 Hippo B.V. (http://www.onehippo.com)
* Copyright 2011-2019 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -16,7 +16,6 @@
package org.onehippo.forge.selection.frontend.plugin.sorting;
import java.io.Serializable;
import java.util.Collections;
import org.hippoecm.frontend.plugin.config.IPluginConfig;
import org.onehippo.forge.selection.frontend.model.ValueList;
......@@ -70,12 +69,12 @@ public class SortHelper implements Serializable {
}
}
if (listItemComparator != null) {
listItemComparator.setConfig(config);
Collections.sort(valueList, listItemComparator);
}
}
if (listItemComparator != null) {
listItemComparator.setConfig(config);
valueList.sort(listItemComparator);
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment