FS-Version: 5.0.318.57504
Hallo liebe Community,
ich versuche gerade den PageStore auszulesen. An sich ist das natürlich nicht schwer und funktioniert auch soweit ohne Probleme.
Nur die Sortierung ist nicht so ganz wie erwartet. Ich hätte gerne die Sortierung die man auch im JavaClient sieht. Wenn ich aber mit getChildren() die Liste aller Elemente bekomme, ist die Reihenfolge "willkürlich". Ich vermute, dass es nach dem Erzeugungsdatum sortiert ist.
Gibt es eine andere mit unbekannte Möglichkeit einen Store auszulesen und dabei die selbe Sortierung zu bekommen wie im JavaClient?
Liebe Grüße
Benjamin
------- English Version ---------------
Hello dear community,
I'm trying to read the PageStore. In itself this is of course not hard and works well so far without problems.
Only the sorting is not quite as expected. I would like to get the same ordering like in the JavaClient. But when I get the list of elements with the getChildren() method, I will get an "arbitary" order. I suspect that it is sorted by creation date.
Is there another way to read a store and to get the same order as in the Java client?
Kind regards
Benjamin
Code example:
import de.espirit.firstspirit.agency.StoreAgent;
import de.espirit.firstspirit.access.store.pagestore.PageStoreRoot;
import java.util.List;
import de.espirit.firstspirit.access.store.StoreElement;
StoreAgent storeAgent = context.requestSpecialist(StoreAgent.TYPE);
PageStoreRoot store = (PageStoreRoot) storeAgent.getStore(Type.PAGESTORE);
List children = store.getChildren().toList();
for (StoreElement element : children) {
// do something
}