please help.
loads all the elements of the table but does not generate the buttons.
the buttons load when you click the header (Name) and disappear when you click the minus and add buttons.
Thank you.
OrderNew.java
please help.
loads all the elements of the table but does not generate the buttons.
the buttons load when you click the header (Name) and disappear when you click the minus and add buttons.
Thank you.
OrderNew.java
Hi,
The problem is that you’re using generated column for the lineTotal
attribute in which you calculate lineTotal
. Instead you need to use a regular column for the lineTotal
attribute since it’s a simple persistence attribute and you only display its value, so no need in generated column. In order to calculate its value, you need to use the ItemPropertyChangeEvent
, e.g.:
@Subscribe(id = "sellablesDc", target = Target.DATA_CONTAINER)
public void onSellablesDcItemPropertyChange(InstanceContainer.ItemPropertyChangeEvent<Sellable> event) {
Sellable sellable = event.getItem();
BigDecimal lineTotal = sellable.getQuantity().multiply(sellable.getBasePrice());
sellable.setLineTotal(lineTotal);
}
Regards,
Gleb