Hi, I need to assign a price property for an entity that is being edited, taking the product selection on an editing screen; then when the product/article changes (from a lookup combo) I take its price and assign it to the price of the current entity (as you see in the image with the name “Importe”). The problem is how i can refresh the FieldGroup with the new price value?. if i refresh the datasource as you see in the attached code, the “fieldgroup” not gets notified.
@Override
protected void postInit() {
super.postInit();
getItem().addPropertyChangeListener((e) -> {
if (e.getProperty() == "articulo") {
Articulo articulo = (Articulo) e.getValue();
if (articulo != null) {
this.getItem().setImporte(
articulo.getPVenta());
fieldGroup.getDatasource().refresh(); // --> this not reload changes
}
}
});
}