Hello community,
as it seems there is currently no way for a language-specific filtering/determination of references in objects of type EditorValue<T>.
Although one can obtain the language from objects of type Reference, which are contained in the List<Reference> returned by the existing method findReferences(), a filtering is only possible if the input component used by the page template was labeled with useLanguages = "yes" and only if no nesting of input components is present. In the case of nested FS_LISTs (e.g.: Mithras-Project -> Download Center), the enveloping DataSource instance is language-independent, the nested FS_LIST is language-dependent while the therein nested FS_REFERENCES are again language-independent. In this case, a language-specific distinction and assignment of FS_REFERENCE maintained by a page is not possible with the existing method findReferences() as all references are added in a no hierarchical fashion to the returned list. Instead, a flattened list is returned whose language-independent items of type Reference have a property of type Language with value null. Hence, in this case it could not be identified if the FS_REFERENCE entries nested in the language-dependent FS_LIST are maintained for a given langauge or not.
As an example:
List[REFERENCE_FOR_NESTED_FS_LIST_ENTRY{Language=EN}, REFERENCE_FOR_FS_REFERENCE{Language=null}]
Currently, REFERENCE_FOR_NESTED_FS_LIST_ENTRY has no single relation to REFERENCE_FOR_FS_REFERENCE_ENTRY.
It's actually too bad, because all the information for a language-based differentiation is already present in the object tree, but is hidden by the API. It only would need a recursive call of a new created method findReferences(Language) on all nested input components or the method findReferences() could only return the top-level-references, from which one could navigate through a hierachy of nested References.
The following API would be really helpful:
List <Reference> references = editor.findReferences (language);
or
List <Reference> references = editor.findReferences (); // Returns only top level references
for (Reference reference: references) {
List <Reference> nestedReferences = reference.findNestedReferences (language);
}
Hier noch die deutsche Version:
https://community.e-spirit.com/message/22232#22232