Can anyone please help with the function below. Im trying to add some calculating function but the second part(where i’m trying to add) is being ignored.
Can anyone please help?
@Override
public void ready() {
evenementDs.addCollectionChangeListener(e -> getItem().setTotaleBijdrage(calculateTotaleBijdrage()));
}
your problem is not related to cuba but simply to java. You don’t do anything with the 2nd block. It’s not being ignored, you just don’t do anything with the result.
Further your null check isn’t followed by {} so if getEvenement() is null it will still blow up with a NullPointerExceptoin in the 2nd block.