Hallo zusammen,
nach was werden denn die ExecutableInlineEditItems sortiert, wenn ein WebeditInlineEditItemsPlugin mehrere davon beim Aufruf von .getItems() zurückgibt?
Ich gebe eine sortiete Liste zurück, jedoch ist die Anzeige im ContentCreator nicht in meiner sortierten Reihenfolge. - Muss man die ExecutableInlineEditItems nochmal explizit mit einem "implements Comparable" versehen?
Beispiel:
Sortiert anhand der sourceLanguage. (Im ExecutableInlineEditItem selbst schalte ich dann noch die Sichtbarkeit aus, wenn die aktuell angezeigte Sprache nicht der targetLanguage entspricht. Erwartungshaltung wäre also "DE - FR - IT".
![338942_pastedImage_0.png 338942_pastedImage_0.png](/t5/image/serverpage/image-id/3800i79DA58D93ED0CB52/image-size/large?v=v2&px=999)
Angezeigt wird aber dies: "IT - DE - FR" Was nicht meiner zurückgelieferten Reihenfolge entspricht.
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAT8AAAD4CAYAAACaPOETAAAWmklEQVR4Ae2d648dR5mHzx8A+cpfQBJYrS9ZnBA2OLYFWXERIBQBG5JAcBjMJQKiNUFi7Eni2AHfxh6PYw8QSLgJCUdCCebyAfjg4bpZk12yBAYhQAoJEgJGREoUKUqh6nPemTrV1d11zumu7jnvM1KpuuvUpfvtXz3zq+6Z072tm3caEjFAA2hAmwZ62k6Y82WSowE0YDUA/HC+OH80oFIDwA/hqxQ+7g/3B/yAH/BDAyo1APwQvkrh4/xwfsAP+AE/NKBSA72bb77ZkIgBGkAD2jTQ27NnjyERAzSABrRpoLd3715DIgZoAA1o00Bv3759hkQM0AAa0KaB3qFDhwyJGKABNKBNA70TJ04YEjFAA2hAmwZ6S0tLhkQM0AAa0KYB4Af8+eWHBlRqAPghfJXC1+ZyON+8swd+wA/4oQGVGgB+CF+l8HFCeSekLSbAD/gBPzSgUgPAD+GrFL42l8P55p0u8AN+wA8NqNQA8EP4KoWPE8o7IW0xAX7AD/ihAZUaAH4IX6XwtbkczjfvdIEf8AN+aEClBoAfwlcpfJxQ3glpiwnwA37AD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Ch+31Y7bKor7lh1vS65D4Af8kouuaAJQ3i0gpbweW659a3IdAj/gl1x0KScVY20MoG6+5k3JdQj8gF9y0QGkjQGklNdp09XXJdch8AN+yUWXclIx1sYA7b9etSu5DoEf8EsuOoC0MYCU8jpt2rYjuQ6BH/BLLrqUk4qxNgZoN23bnlyHwA/4JRcdQNoYQEp5nTZf+drkOgR+wC+56FJOKsbaGKDdcuU1yXUI/IBfctEBpI0BpJTX6YqrcH7z8+lglHqsXkoxMRaA2UgaeNWrueeXGkgpxwN+/A8tLrtAA1defW3y2LDsTec0gV+B8DeSQ+FYm3HUV1/D3/mldGKpxwJ+wC+5u9kosL525xuSxwbnh/NLLrqNMiE5zmZcXiiu//HGtyfXIfADfslFFxI/ZelA08VYv+36G5PrEPglhN/Cl79p/vznvya/yF0UO8ekG3b+9X/XTR9IPi+AX0L49f7lDeadtx8yv/3dk8kvtC829oFPlzRwy57bk88J4JcYfhaAu2dPmD899ZfkF7tLYudYgK+rgQ//11zy+QD8WoCfBeBnv/7t5BfbFRvbwKdLGvjk3fPJ5wPwawl+b/7gnPn9H59OfsG7JHiOBQCLBg4uPJB8LgC/luD3su03mB/+5H+TX3ARGzng6ZIGFr/0SPK5APzSwe+f6kBcFc3PtFsAAAAASUVORK5CYII=)
Sourcecode:
@NotNull
@Override
public Collection<? extends ExecutableInlineEditItem> getItems() {
List<OpenTranslationUIExecutableInlineEditItem> inlineEditItems = new ArrayList<>();
for (LangCombination langCombination : langCombinations) {
inlineEditItems.add(new OpenTranslationUIExecutableInlineEditItem(null, langCombination.getSource(), langCombination.getTarget()));
}
return inlineEditItems.stream()
.sorted(Comparator.comparing(e -> e.getSourceLanguage().getAbbreviation())) // sort while streaming
.collect(Collectors.toCollection(ArrayList::new));
}
Für Tipps und Hinweise bin ich dankbar!
Beste Grüße
Sandro