Add an OK to save changes

Hi, how could I add an OK button for this tutorial Development beyond CRUD · aleksey-stukalov/workshop Wiki · GitHub, after this:

  1. Let’s implement the onBtnNewStatusClick method, that was created by the Studio:
    public void onBtnNewStatusClick(Component source) {
    Order selectedItem = ordersDs.getItem();
    if (selectedItem != null) {
    selectedItem.setStatus(OrderStatus.NEW);
    ordersDs.commit();
    }
    }

Because this code works setting the order to “NEW”, but if I close the order browser, the changes are not saved.

Thank you.

Hi Jorge,

Are you sure you followed the steps right? I cannot reproduce the problem you have described.

Regards,

Aleksey

Hi Aleksey, I just restart mi computer and the web app and It works, why sometimes I need to restart them in order to fix something?

Thank you

Regards.