Hello:
1.- Class A
package com.dominio;
public class ClassA {
private String name;
private ClassB classB;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ClassB getClassB() {
return classB;
}
public void setClassB(ClassB classB) {
classB = classB;
}
}
2.- Class B
package com.dominio;
public ClassB(){}
public class ClassB {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
I get the data from the database and write the following:
......
public BeanItemContainer<ClassA> getListClassA() {
List<ClassA> lista = this.getControl().getServiceClassA().getListClassA();
BeanItemContainer<ClassA> containerClassA = new BeanItemContainer<ClassA>(lista);
return containerClassA;
}
.............
and then in the table :
...
setContainerDataSource(app.getDataSource().getListaClassA);
.....
and I get the below, which is incorrect:
Name Class A | Name Class B
Henri | com.ClassB@1687dcd
must show the following, which is correct:
Name Class A | Name Class B
Henri | Eric
I need to write in class A or B, or I have to do something more to beanItemContainer to display data correctly in the table?