orderLine edit

Hi

I have an order with orderlines edit screen. I have a button that changes the currency (changes between EUR/USD/GBP) for all the prices in the order lines. The conversion takes places in the controller and uses a service:


        valutaField.addValueChangeListener(e->{
            List<OfertaLinie> ofertaLinies = new ArrayList( liniiDs.getItems());
            for (OfertaLinie ofertaLinie: ofertaLinies) {
                ofertaLinie.setPret(produsService.conversiePret(ofertaLinie.getPret(),(Valuta) e.getPrevValue(),
                        afisareCuTvaField.getValue(),(Valuta) e.getValue(), afisareCuTvaField.getValue()));
            }
            liniiDs.refresh();
        });

the conversion works well, but If i save the Entity, open the edito again, change currency and the open one orderLine for editing, I get the old value in the edit screen. I think it shows the committed value from the database instead of the value from the datasource. How do I correct this behavior?

Thank you

I think it’s something wrong in my business logic… let me check something first…

Yeah, sorry about that! working fine now