I populate Employees pojo in TableView colums.
Employer contains rate property, that contains doubleDomainObject which not populate in tableView.
Implementation of comboBox i not showing because it good working with CellFactory. It is desirable to focus with CellValueFactory.
DoubleDomainObject
public class DoubleDomainObject extends DomainObject {
private SimpleObjectProperty<Double> doubleValue =new SimpleObjectProperty(this, "doubleValue", null);
public Double getDoubleValue() {return doubleValue.get(); }
public SimpleObjectProperty<Double> doubleValueProperty() {return doubleValue;}
public void setDoubleValue(Double value) {this.doubleValue.set(value);}
}
ColumnDoubleComboBox
public class ColumnDoubleComboBox extends ColumnWrapper{
protected TableColumn<DomainObject, DoubleDomainObject> column;
@SuppressWarnings("unchecked")
public ColumnDoubleComboBox(Bulder builder) {
super(builder);
this.column = new TableColumn<>(columnName);
setCellValueFactory();
setCellFactory();
}
public void setCellValueFactory(){
column.setCellValueFactory(new PropertyValueFactory<>(propertyName));
}
}
Employees
public class Employees extends DomainObject {
private SimpleObjectProperty<DoubleDomainObject> rate =new
SimpleObjectProperty<>(this, "rate", null);
public DoubleDomainObject getRate() {
return rate.get();
}
public SimpleObjectProperty<DoubleDomainObject> rateProperty() {
return rate;
}
public void setRate(RatePerHour rate) {
this.rate.set(rate);
}
}
---Сlient code---
tableViewWrapper = AppNode.NodeBuilder.create()
.<Employees>createTableViewWrapper()
.setDataMapper(this.dataMapperFabric.getEmployeesDataMapper())
.setColums(
columnFabric.createColumnDoubleComboBox(ColumnWrapper.Bulder.create()
.setColumnName("RATE").setColumnSize(0.2).setPropertyName("rate")
.............................etc
);
itemslist have arateProperty()method, this should give you something (though it might not give it to you formatted the way you want).