Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
addNestedContainerProperty für ein Set<Object>
Guten Tag,
ich habe folgendes Problem.
Ich habe:
class User {
private Adress adress;
private Set<Usergroup> usergroups;
}
class Adress {
private String streetName;
}
class Usergroup {
private String groupName;
}
// funktioniert
container.addNestedContainerProperty("adress.streetName");
// funktioniert nicht, usergroup nicht bekannt
container.addNestedContainerProperty("usergroups.usergroup.groupName");
Wie komme ich an den groupName der Usergroup heran, so das ich diese in einem Grid als Tabellenspalte anzeigen lassen kann. Vielen Dank im voraus
Das ist mit einer Collection nicht möglich. Das geht nur mit 1:1 Beziehungen.
If you have a nested bean with an 1:1 relationship inside a bean type contained in a BeanContainer orBeanItemContainer, you can add its properties to the container by specifying them with addNestedContainerProperty(). The feature is defined at the level of AbstractBeanContainer.
Siehe: Nested Properties