We are using JMIX version 1.6. We have an entity ActivityGroup and within it composition entities Activity. In Edit screen of ActivityGroup, we are changing serial number of activities programmatically by pressing up & down buttons. But , they are not reflected in edit screen of Activity Entity. The changes are only reflected on using datamanager.save() or datacontext.commit() functions. What need to be done to access the edited Activity fields in edit screen of any other activity. The code being used is as follows:
Optional<TActivity> selActivity = getEditedEntity().getTactivities().stream().filter(act -> act.getSerialNumber().equals(selectedItemSN)).findFirst();
Optional<TActivity> preActivity = getEditedEntity().getTactivities().stream().filter(act -> act.getSerialNumber().equals(selectedItemSN - 1)).findFirst();
selActivity.get().setSerialNumber(selectedItemSN - 1);
preActivity.get().setSerialNumber(selectedItemSN);
tactivitiesTable.sort("serialNumber", Table.SortDirection.ASCENDING);
Please guide.